Skip to content

Conversation

@omnivelociraptor
Copy link

…lights

When the pygments plugin calls pygmentize with a language it does not recognize, Pygments outputs Error: no lexer for alias 'lang' found and leaves the file meant to capture the result blank. This means that the value of the out variable, here, is equal to a blank string (""), and therefore, the following assert fails and we see the "Failed to parse pygmentize result, is pygments installed?" error, even though pygments is installed.

This change will make the pygments plugin output a warning and return the original code block, html-escaped and without highlighting, rather than failing with an error, when encountering a language Pygments does not recognize.

local p = parts[_index_0]
local _update_0 = p
callbacks[_update_0] = callbacks[_update_0] or { }
callbacks[p] = callbacks[p] or { }
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what this is about. It changed to this after I ran moonc sitegen, so I just left it in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant