From 857564c255177275eadf933e4c9b89a7e37be7ba Mon Sep 17 00:00:00 2001 From: Josh Goebel Date: Sun, 19 Mar 2023 11:42:15 -0400 Subject: [PATCH] (lint) auto-lint --- src/highlight.js | 6 +++--- tools/lib/language.js | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/highlight.js b/src/highlight.js index 4443a7c797..b27e169320 100644 --- a/src/highlight.js +++ b/src/highlight.js @@ -588,7 +588,7 @@ const HLJS = function(hljs) { return { language: languageName, value: result, - relevance: relevance, + relevance, illegal: false, _emitter: emitter, _top: top @@ -602,7 +602,7 @@ const HLJS = function(hljs) { relevance: 0, _illegalBy: { message: err.message, - index: index, + index, context: codeToHighlight.slice(index - 100, index + 100), mode: err.mode, resultSoFar: result @@ -724,7 +724,7 @@ const HLJS = function(hljs) { if (shouldNotHighlight(language)) return; fire("before:highlightElement", - { el: element, language: language }); + { el: element, language }); // we should be all text, no child nodes (unescaped HTML) - this is possibly // an HTML injection attack - it's likely too late if this is already in diff --git a/tools/lib/language.js b/tools/lib/language.js index a7875aa973..92e105546c 100644 --- a/tools/lib/language.js +++ b/tools/lib/language.js @@ -56,11 +56,11 @@ class Language { const categoryMatch = CATEGORY_REGEX.exec(this.data); const languageMatch = LANGUAGE_REGEX.exec(this.data); - if (requiresMatch) { + if (requiresMatch) { this.requires = requiresMatch[1] - .split(", ") - .map((n) => n.replace(".js", "")) - .filter(n => n.trim() !== ""); + .split(", ") + .map((n) => n.replace(".js", "")) + .filter(n => n.trim() !== ""); } if (categoryMatch) { this.categories = categoryMatch[1].split(/,\s?/); }