I tried the version 8.0.5 and find out that Highlight.js can not render code. I have looked up the source code and find here. It looks like only the lang is code will call highlight function, but hljs.getLanguage('code') ? lang : 'plaintext' is always plaintext. So maybe we need to place the highlighting judgment at the end like
// all other judgment
else if (hljsInstalled) {
const language = hljs.getLanguage(lang) ? lang : 'plaintext';
return hljs.highlight(code, { language }).value;
}
Also, can we let the user customize the renderingConfig
I tried the version 8.0.5 and find out that Highlight.js can not render code. I have looked up the source code and find here. It looks like only the
lang
iscode
will call highlight function, buthljs.getLanguage('code') ? lang : 'plaintext'
is always plaintext. So maybe we need to place the highlighting judgment at the end likeAlso, can we let the user customize the
renderingConfig