[TUI] Fix Spectre colors with numbers and underscores not being processed.

This commit is contained in:
2025-10-25 17:07:14 +01:00
parent 1e78923eed
commit 1d7c3bc1f3

View File

@@ -524,7 +524,7 @@ public partial class SpectreTextBlock : TextBlock
return result;
}
[GeneratedRegex(@"^(?<fg>#[0-9a-fA-F]{6}|rgb\(\d{1,3},\d{1,3},\d{1,3}\)|[a-zA-Z]+)(\s+on\s+(?<bg>#[0-9a-fA-F]{6}|rgb\(\d{1,3},\d{1,3},\d{1,3}\)|[a-zA-Z]+))?$",
[GeneratedRegex(@"^(?<fg>#[0-9a-fA-F]{6}|rgb\(\d{1,3},\d{1,3},\d{1,3}\)|[a-zA-Z0-9_]+)(\s+on\s+(?<bg>#[0-9a-fA-F]{6}|rgb\(\d{1,3},\d{1,3},\d{1,3}\)|[a-zA-Z0-9_]+))?$",
RegexOptions.Compiled)]
private static partial Regex ColorRegex();