question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Number colorization problem

See original GitHub issue

HI 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. image Any advice about that?

Issue Analytics

  • State:closed
  • Created 7 months ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
silkfirecommented, Feb 27, 2023

Yea, Pastel relies on ANSI codes to work, so if your string contains that it can pick up on that and mess things up.

0reactions
AIUbicommented, Feb 27, 2023

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found