Fix AnsiShortcodeParser parsing

This commit is contained in:
JeremyStar™ 2024-12-05 15:27:23 +01:00
parent f76878f067
commit 0c26660f27
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -63,12 +63,12 @@ public final class AnsiShortcodeParser extends ShortcodeParser {
status.clear();
} else if (component.startsWith("TEXT:"))
ansi.a(component.substring(5));
else if (component.startsWith("COLOR:"))
else if (component.startsWith("COLOR:")) {
if (component.startsWith("COLOR:FOREGROUND:"))
ansi.fg(Ansi.Color.valueOf(component.substring(17)));
else if (component.startsWith("COLOR:BACKGROUND:"))
ansi.bg(Ansi.Color.valueOf(component.substring(17)));
else if (component.startsWith("ATTRIBUTE:"))
} else if (component.startsWith("ATTRIBUTE:"))
if (component.startsWith("ATTRIBUTE:BLINK")) {
if (status.contains("ATTRIBUTE:BLINK"))
continue;