From 75a0b8d69ab21e117ef13c3f49f522973ec0d5fc Mon Sep 17 00:00:00 2001 From: Josh Goebel Date: Wed, 19 Feb 2020 07:39:59 -0500 Subject: [PATCH] simpler naming --- src/highlight.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/highlight.js b/src/highlight.js index 10c7e08241..726d217782 100644 --- a/src/highlight.js +++ b/src/highlight.js @@ -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 @@ -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);