Skip to content

Commit

Permalink
(lint) auto-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
joshgoebel committed Mar 19, 2023
1 parent 3691543 commit 857564c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/highlight.js
Expand Up @@ -588,7 +588,7 @@ const HLJS = function(hljs) {
return {
language: languageName,
value: result,
relevance: relevance,
relevance,
illegal: false,
_emitter: emitter,
_top: top
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions tools/lib/language.js
Expand Up @@ -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?/); }
Expand Down

0 comments on commit 857564c

Please sign in to comment.