Such like the title .
Native :
<!--
use hljs.initHighlightingOnLoad();
-->
<pre>
<code class="lang-php hljs">
<span class="hljs-keyword">echo</span>
<span class="hljs-string">"ok"</span>
</code>
</pre>
<!--
use highlight: function (code) {
return hljs.highlightAuto(code).value;
}
-->
<pre>
<code class="lang-php">
<span class="hljs-keyword">echo</span>
<span class="hljs-string">"ok"</span>;
</code>
</pre>
the same issue for me锛侊紒
Issue closed, but it seems to still be happening (even to me). Anyone have an idea how to fix this? Do I need to set an option?
Anyway with trying to override the code renderer, I saw that I could simply change the langPrefix for hljs lang-.
md.setOptions({
highlight: function (code) {
console.log()
return hljs.highlightAuto(code).value
},
langPrefix: 'hljs lang-'
})
This is still an issue for me too. The above solution resolved it so thank you!
Most helpful comment
Anyway with trying to override the code renderer, I saw that I could simply change the langPrefix for
hljs lang-.