Fix AnsiShortcodeParser parsing
Some checks failed
build-and-test / generate-javadoc (push) Failing after 1m10s
build-and-test / build (push) Failing after 1m13s
build-and-test / test (push) Failing after 1m11s

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(); status.clear();
} else if (component.startsWith("TEXT:")) } else if (component.startsWith("TEXT:"))
ansi.a(component.substring(5)); ansi.a(component.substring(5));
else if (component.startsWith("COLOR:")) else if (component.startsWith("COLOR:")) {
if (component.startsWith("COLOR:FOREGROUND:")) if (component.startsWith("COLOR:FOREGROUND:"))
ansi.fg(Ansi.Color.valueOf(component.substring(17))); ansi.fg(Ansi.Color.valueOf(component.substring(17)));
else if (component.startsWith("COLOR:BACKGROUND:")) else if (component.startsWith("COLOR:BACKGROUND:"))
ansi.bg(Ansi.Color.valueOf(component.substring(17))); ansi.bg(Ansi.Color.valueOf(component.substring(17)));
else if (component.startsWith("ATTRIBUTE:")) } else if (component.startsWith("ATTRIBUTE:"))
if (component.startsWith("ATTRIBUTE:BLINK")) { if (component.startsWith("ATTRIBUTE:BLINK")) {
if (status.contains("ATTRIBUTE:BLINK")) if (status.contains("ATTRIBUTE:BLINK"))
continue; continue;