Closed AlexPoulsen closed 5 years ago
Can you give an example that this fixes the highlighting for? Because I'm seeing the same thing with both. It doesn't seem right to remove the \b
- it would match numbers inside other tokens.
With \b
:
Without \b
:
it's not perfect, the hex literal isn't colored right, but it's better
I made a recent fix to this, and I suspect you're looking at a commit prior to that. Here's what I see (color scheme changed to emphasize the numbers):
The \b
is still needed though, and that wouldn't affect matching multiple digit numbers, it prevents matching inside of other words. Not having them breaks hex parsing for example:
There are two improvements we could make, and you're welcome to make them here if you'd like to:
\b
at the beginning, use (\b|-)
to capture leading negative signA-F
in addition to a-f
so it turns out my code to install the package had a bug and so i probably had an old version in there
it removes regex
\b
tags, which fixes highlighting multi-digit numbers for whatever reason