Languege Undefined causes stylesheet to not apply
Blue-Pilkinton-Ching opened this issue · 2 comments
Consider the code:
markedHighlight({ langPrefix: 'hljs ', highlight(code, lang) { const language = hljs.getLanguage(lang) ? lang : 'plaintext' return hljs.highlight(code, { language }).value }, })
If hljs.getLanguage(lang) === undefined, then the langPrefix classes are not applied to the codeblock including 'hljs'. This means that the formatting for the code block breaks.
Below images, are examples of formatting working, broken, and what it should look like if hljs class was still aplied correctly.
In the middle image, you can see that the class "hljs" isn't applied to the code block. And so, it doesn't get the proper background color and padding that it should have as seen in the bottom image. (bottom image had the hljs class applied manually)
Sounds like a problem for hljs. We don't supply any styles.
Sounds like a problem for hljs. We don't supply any styles.
Looks like it. Cheers!