ansi: Fix rendering hex colors v1 APPLIED

delthas: 1
 ansi: Fix rendering hex colors

 1 files changed, 1 insertions(+), 0 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~emersion/goguma-dev/patches/39177/mbox | git am -3
Learn more about email & git

[PATCH] ansi: Fix rendering hex colors Export this patch

My previous commit implementing hex colors [1] has a bug which
prevents hex colors from being rendered in some cases.

This commit fixes the issue by adding a missing switch case.

[1]: 0aa7db9c0afbe989d0f8c8b9110f685e17439003
 lib/ansi.dart | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/ansi.dart b/lib/ansi.dart
index bfb01ce..8a52da2 100644
--- a/lib/ansi.dart
+++ b/lib/ansi.dart
@@ -69,6 +69,7 @@ List<TextSpan> applyAnsiFormatting(String s, TextStyle base) {
		case '\x1D': // italic
		case '\x1F': // underline
		case '\x03': // color
		case '\x04': // hex color
			List<TextDecoration> decorations = [base.decoration ?? TextDecoration.none];
			if (underline) {

base-commit: 09f6ece77bbf9e3727541eea66b07e2986779bf0
Pushed, thanks!

I also fixed stripAnsiFormatting() for hex colors while at it.