You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to have a highlight for versions (51.4.5 5.1.dev5 0.1.4a3 ...) following PEP 440. Currently these expresions are semi-highlighted as numbers.
An interesting regex for "version" could be something like
The type number should be preferred before version (for example "5.1" is a number). But, then, "5.1.5" should not be detected as a number (not even partially) for type version to detect it. Unfortunately, I don't have much experiance in regex :/
The text was updated successfully, but these errors were encountered:
I suspect that would overlap with numbers too much, which is a more common thing to highlight. i.e. is 5.1 a number or a version?
Ultimately though, I'm loathed to add another regex to the default highlighter. Each one slows it down a little. If you need it, its not hard to implement with a custom highlighter.
It would be nice to have a highlight for versions (51.4.5 5.1.dev5 0.1.4a3 ...) following PEP 440. Currently these expresions are semi-highlighted as numbers.
An interesting regex for "version" could be something like
([1-9]\d*!)?(0|[1-9]\d*)(\.(0|[1-9]\d*))*((a|b|rc)(0|[1-9]\d*))?(\.post(0|[1-9]\d*))?(\.dev(0|[1-9]\d*))?
The type number should be preferred before version (for example "5.1" is a number). But, then, "5.1.5" should not be detected as a number (not even partially) for type version to detect it. Unfortunately, I don't have much experiance in regex :/
The text was updated successfully, but these errors were encountered: