Skip to content

Commit

Permalink
autoHighlight calls private _highlight interally
Browse files Browse the repository at this point in the history
  • Loading branch information
joshgoebel committed Feb 19, 2020
1 parent 4e83bd3 commit bba4f49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const HLJS = function(hljs) {
var context = {
originalCode: code,
language: languageName
}
};
// the plugin can change the desired language or the code to be highlighted
// just be changing the object it was passed
fire("before:highlight", context);
Expand Down Expand Up @@ -401,7 +401,7 @@ const HLJS = function(hljs) {
};
var second_best = result;
languageSubset.filter(getLanguage).filter(autoDetection).forEach(function(name) {
var current = highlight(name, code, false);
var current = _highlight(name, code, false);
current.language = name;
if (current.relevance > second_best.relevance) {
second_best = current;
Expand Down

0 comments on commit bba4f49

Please sign in to comment.