Number colorization problem
See original GitHub issueHI have issue with numbers.
I’m trying to make syntax highlighting, with braces works fine but not with numbers.
This is how I use pastel for number string
_numbers.Replace(message, x => (@x.Value).Pastel(UITheme.SyntaxNumberFg));
This is a regular expressions for numbers
private static readonly RegexOptions _regexOptions = RegexOptions.IgnoreCase | RegexOptions.Compiled | RegexOptions.CultureInvariant; private Regex _numbers = new Regex(@"[0-9]+", _regexOptions);
And this is what happens if I enter regular number into console.
Any advice about that?
Issue Analytics
- State:
- Created 7 months ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Graph coloring
Graph coloring has been studied as an algorithmic problem since the early 1970s: the chromatic number problem (see below) is one of Karp's...
Read more >Graph Coloring Problem
Graph coloring problem involves assigning colors to certain elements of a graph subject to certain restrictions and constraints.
Read more >Only Computers Can Solve This Map-Coloring Problem ...
The four-color problem is simple to explain, but its complex ... The minimum number of colors is called the chromatic number of the...
Read more >5.8 Graph Coloring
Given a graph G it is easy to find a proper coloring: give every vertex a different color. Clearly the interesting quantity is...
Read more >Graph Coloring | Set 1 (Introduction and Applications)
Vertex coloring is the most common graph coloring problem. · Chromatic Number: The smallest number of colors needed to color a graph G...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yea, Pastel relies on ANSI codes to work, so if your string contains that it can pick up on that and mess things up.
Ty for your time