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