Skip to content

Commit

Permalink
Fix ESLint reports
Browse files Browse the repository at this point in the history
  • Loading branch information
Qeole committed Dec 3, 2024
1 parent a8e8509 commit 55d70c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/coloring.js
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand All @@ -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") {
Expand Down

0 comments on commit 55d70c8

Please sign in to comment.