Skip to content

Commit

Permalink
simpler naming
Browse files Browse the repository at this point in the history
  • Loading branch information
joshgoebel committed Feb 19, 2020
1 parent bba4f49 commit 75a0b8d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/highlight.js
Expand Up @@ -84,13 +84,13 @@ const HLJS = function(hljs) {
* @property {string} language - the language name
* @property {number} relevance - the relevance score
* @property {string} value - the highlighted HTML code
* @property {string} originalCade - the original raw code
* @property {string} code - the original raw code
* @property {mode} top - top of the current mode stack
* @property {boolean} illegal - indicates whether any illegal matches were found
*/
function highlight(languageName, code, ignore_illegals, continuation) {
var context = {
originalCode: code,
code,
language: languageName
};
// the plugin can change the desired language or the code to be highlighted
Expand All @@ -101,9 +101,9 @@ const HLJS = function(hljs) {
// in which case we don't even need to call highlight
var result = context.result ?
context.result :
_highlight(context.language, context.originalCode, ignore_illegals, continuation);
_highlight(context.language, context.code, ignore_illegals, continuation);

result.originalCode = context.originalCode;
result.code = context.code;
// the plugin can change anything in result to suite it
fire("after:highlight", result);

Expand Down

0 comments on commit 75a0b8d

Please sign in to comment.