-
Notifications
You must be signed in to change notification settings - Fork 0
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
Invalid regular expressions in grammar #1
Comments
OK,thanks, but how to detect invalid regular expressions for |
We use the compiler here which uses a PCRE library to validate all the regular expressions. You can do something similar on from the CLI using |
The regex works in ECMAScript (Javascript) but doesn't work for PCRE and others. That's why it works in vscode but can't work somewhere else. |
@glcraft Thanks, the grammar file for linguist has been updated just now |
Should be closed by nushell/vscode-nushell-lang#137 |
👋 from github-linguist/linguist.
I'm in the process of creating the next release and I've seen our grammar compiler has detected the grammar has two invalid regular expressions which may impact the highlighting of some Nushell files:
vendor/grammars/nu-grammar
(from https://github.com/hustcer/nu-grammar.git) (2 errors)source.nushell
(ingrammars/tmLanguage.json
) contains a malformed regex (regex "(?<!\w)(?:(\^)|(?![0-9]|(?<=\)|\
...": lookbehind assertion is not fixed length (at offset 42))source.nushell
(ingrammars/tmLanguage.json
) contains a malformed regex (regex "(?<=\)|\}|\]|\$\w+)(?:\.(?:[\w-]
...": lookbehind assertion is not fixed length (at offset 18))I suspect these were reported in the output when you added the grammar to Linguistin your original PR but likely missed it.
I won't hold back the release for this to be fixed, but I will be adding this to the list of known grammar issues: github-linguist/linguist#3924. Any fixes you make to this grammar will be pulled in when the next release is made.
The text was updated successfully, but these errors were encountered: