Fix xo errors

Signed-off-by: yubiuser <github@yubiuser.dev>
This commit is contained in:
yubiuser
2026-03-16 08:55:20 +01:00
parent f27d663614
commit c02e66fe04
14 changed files with 61 additions and 28 deletions

View File

@@ -86,7 +86,7 @@ function parseLines(outputElement, text) {
// We want to split the text before an "OVER" escape sequence to allow overwriting previous line when needed
// Splitting the text on "\r"
const lines = text.split(/(?=\r)/g);
const lines = text.split(/(?=\r)/gv);
for (let line of lines) {
// Escape HTML to prevent XSS attacks (both in adlist URL and non-domain entries)
@@ -117,7 +117,7 @@ function parseLines(outputElement, text) {
// Create a regex that matches all ANSI codes (including reset)
/* eslint-disable-next-line no-control-regex */
const ansiRegex = /(\u001B\[(?:1|90|91|32|33|94|95|96|0)m)/g;
const ansiRegex = /(\u001B\[(?:1|90|91|32|33|94|95|96|0)m)/gv;
// Process the line sequentially, replacing ANSI codes with their corresponding HTML spans
// we use a counter to keep track of how many spans are open and close the correct number of spans when we encounter a reset code