From 55d70c8e0ee05c86905353117c9c61bce20b7df7 Mon Sep 17 00:00:00 2001 From: Qeole Date: Tue, 3 Dec 2024 20:42:46 +0000 Subject: [PATCH] Fix ESLint reports --- scripts/coloring.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/coloring.js b/scripts/coloring.js index 0d20b15..37f96d3 100644 --- a/scripts/coloring.js +++ b/scripts/coloring.js @@ -14,7 +14,8 @@ const coloring = { const preNodes = document.querySelectorAll("body > div > pre"); for (const pre of preNodes) { - let i, j = -1; + let i; + let j = -1; for (i = 0; i < pre.childNodes.length && j < 0; i++) { if (pre.childNodes[i].nodeName === "#text") { @@ -26,7 +27,7 @@ const coloring = { } } if (j >= 0) { - pre.childNodes[i - 1].splitText(j + '---'.length); + pre.childNodes[i - 1].splitText(j + "---".length); } for (; i < pre.childNodes.length; i++) { if (pre.childNodes[i].nodeName === "#text") {