From cd05f9f14710b3592e4946802094eca01f2d7143 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/highlight.js b/src/highlight.js index 10c7e08241..f8e455bb0e 100644 --- a/src/highlight.js +++ b/src/highlight.js @@ -90,7 +90,7 @@ const HLJS = function(hljs) { */ 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);