~emersion/goguma-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] ansi: Fix rendering hex colors

Details
Message ID
<20230220151526.140196-1-delthas@dille.cc>
DKIM signature
missing
Download raw message
Patch: +1 -0
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) {
				decorations.add(TextDecoration.underline);

base-commit: 09f6ece77bbf9e3727541eea66b07e2986779bf0
-- 
2.39.1
Details
Message ID
<szWjtCI7nbkNm08ASy69ENBu76nV-1_vPx35hRxcf-DQA2WFdPwSYfFV79RG9epwfoR9Sv3s-xjNCpoJdjRTas57G6TrcYBnmHnGRJyJ1bA=@emersion.fr>
In-Reply-To
<20230220151526.140196-1-delthas@dille.cc> (view parent)
DKIM signature
missing
Download raw message
Pushed, thanks!

I also fixed stripAnsiFormatting() for hex colors while at it.
Reply to thread Export thread (mbox)