You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe this behavior is because org is not a supported Lexer by Pygments. But even in that case, can Hugo be fixed so that the HTML output is the latter of the above even with pygmentsCodeFences set to true. i.e. even if a language foo is not supported by Pygments, wrap the user-specified code block in:
Can the pygmentize call's return value be checked for an error or something? If error code is returned, as a foo language is not supported by pygmentize, pass
```
some foo code
```
to Blackfriday (remove the language descriptor following the backticks), instead of:
```foo
some foo code
```
I don't know how to code in Go. So I would be grateful to anyone who can implement this. Thanks!
The text was updated successfully, but these errors were encountered:
[Reference]
Hello,
I have
pygmentsCodeFences
set totrue
in my siteconfig.toml
.And here is an example post in Markdown:
With that I get this HTML (simplified to highlight the issue) generated by Hugo:
Note that "# Org comment" is not in a
<code>
block!If I remove that language identifier:
, OR set
pygmentsCodeFences
tofalse
, the HTML is:I believe this behavior is because
org
is not a supported Lexer by Pygments. But even in that case, can Hugo be fixed so that the HTML output is the latter of the above even withpygmentsCodeFences
set totrue
. i.e. even if a languagefoo
is not supported by Pygments, wrap the user-specified code block in:Suggested solution
Can the
pygmentize
call's return value be checked for an error or something? If error code is returned, as afoo
language is not supported bypygmentize
, passto Blackfriday (remove the language descriptor following the backticks), instead of:
I don't know how to code in Go. So I would be grateful to anyone who can implement this. Thanks!
The text was updated successfully, but these errors were encountered: