Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heads up: problems with github.com/dlclark/regexp2 1.5.0 and later #805

Closed
jmooring opened this issue Jul 31, 2023 · 3 comments
Closed

Comments

@jmooring
Copy link
Contributor

Chroma currently uses github.com/dlclark/regexp2 1.4.0, which is fine. At some point in the future, if we bump to 1.5.0 or later, there will be problems.

Highlighting this string with the Go lexer:

xəx := 0

With dlclark/regexp2 1.4.0 (PASS):

<span class="nx">xəx</span>

With dlclark/regexp2 1.5.0 and later (FAIL):

<span class="nx">x</span>
<span class="err">ə</span>
<span class="nx">x</span>
@alecthomas
Copy link
Owner

Interesting, have you filed a bug with regexp2?

@jmooring
Copy link
Contributor Author

No.

@alecthomas
Copy link
Owner

This appears to be because dclark made RE2 compatibility mode (which Chroma uses) stricter. In particular, \w now only matches ASCII words.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants