update deno commons mod

This commit is contained in:
2026-02-08 15:58:30 +08:00
parent 5d90b0af30
commit 4ba3745666

View File

@@ -272,11 +272,11 @@ function parseColorTokens(message: string, renderColor: boolean): ColorToken[] {
const nextC = (i + 1) < messageLength const nextC = (i + 1) < messageLength
? message.charAt(i + 1) ? message.charAt(i + 1)
: null; : null;
const nextNexC = (i + 2) < messageLength const nextNextC = (i + 2) < messageLength
? message.charAt(i + 2) ? message.charAt(i + 2)
: null; : null;
if (noEscape) { if (noEscape) {
if (c === "]" && nextC === "]" && nextNexC === "]") { if (c === "]" && nextC === "]" && nextNextC === "]") {
// end no escape // end no escape
noEscape = false; noEscape = false;
i += 2; i += 2;
@@ -301,7 +301,7 @@ function parseColorTokens(message: string, renderColor: boolean): ColorToken[] {
} else if (nextC == "/") { } else if (nextC == "/") {
inColorEnd = true; inColorEnd = true;
i++; i++;
} else if (nextC == "[" && nextNexC == "[") { } else if (nextC == "[" && nextNextC == "[") {
// now no escape // now no escape
noEscape = true; noEscape = true;
i += 2; i += 2;