Skip to content

Commit

Permalink
Merge pull request #764 from YusukeHirao/fix/addClass
Browse files Browse the repository at this point in the history
fixed: language is added to className every run the parse
  • Loading branch information
isagalaev committed Feb 26, 2015
2 parents d6da3e5 + d5a0970 commit 94b7835
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ https://highlightjs.org/
result.push('hljs');
}

if (language) {
if (prevClassName.indexOf(language) === -1) {
result.push(language);
}

Expand Down

0 comments on commit 94b7835

Please sign in to comment.