gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
75.07k stars 7.48k forks source link

reStructuredText uses long token names for syntax highlighting #5349

Open stephenfin opened 5 years ago

stephenfin commented 5 years ago

rst2html can generate HTML with short or long form class names for syntax highlighting. Pygments (via the pygmentize command) seems to generate short form by default without any way to switch this. This means most/any stylesheets for code provided with various themes won't work when using rST output. This can easily be fixed by providing the --syntax-highlight=short flag to rst2html.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help. If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open. If this is a feature request, and you feel that it is still relevant and valuable, please tell us why. This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

stephenfin commented 5 years ago

This is a bug. Without this fix, we do not have syntax highlighting when using rST resources.