Skip to content

Commit

Permalink
Only use the hljs-ln class when can highlight the code (mattermost#4313)
Browse files Browse the repository at this point in the history
  • Loading branch information
jespino committed Nov 27, 2019
1 parent d6ec9ac commit f3eafe1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/markdown/renderer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default class Renderer extends marked.Renderer {

let className = 'post-code';
let codeClassName = 'hljs hljs-ln';
if (!usedLanguage) {
if (!SyntaxHighlighting.canHighlight(usedLanguage)) {
className += ' post-code--wrap';
codeClassName = 'hljs';
}
Expand Down

0 comments on commit f3eafe1

Please sign in to comment.