-
Notifications
You must be signed in to change notification settings - Fork 300
Description
highlight.js seems to be one of the most popular libraries for syntax highlighting. Sometimes, its "auto guessing the language" feature leads to strange results. The feature can be turned off using "nohighlight" (instead of "language-...") as class for the code
<pre><code class="nohighlight">...</code></pre>Currently, flexmark renders fenced code blocks without language specification as code without a class attribute, thus "triggering" the auto guessing feature. It would be nice to be able to prevent auto guessing for the complete generated markup with a new option FENCED_CODE_LANGUAGE_DEFAULT_CLASS. When set, fenced code blocks without language would be rendered as code with a class attribute with the specified value.
Setting FENCED_CODE_LANGUAGE_DEFAULT_CLASS = "nohighlight" would then turn off auto guessing for the complete generated document.