-
Notifications
You must be signed in to change notification settings - Fork 141
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
Panic due to erroneous regex-rewriting #164
Comments
Darn. The nonewlines rewriting is always very fraught and causes us a lot of trouble. Not sure how to fix this. One option is to just add a special case for this instead of solving it generally, which I've done before. |
I quickly tried to patch this by keeping track of whether we are in a group It would be great if we could use the regex engine to parse the regex first and perform the transformation on the AST. However,
That sounds like a valid option for now. How would this work? Would the special case be the full regex |
Probably just the |
The But the problem here is not the group, it's the So I also think doing a replace is better in this case. We could rewrite |
Running
syncat
in no-newlines mode fails for the following file:test.rd
(R documentation)This is apparently caused by rewriting the following regex:
from
testdata/Packages/R/Rd (R Documentation).sublime-syntax
line 92 in a way that it includes(?:$)?
at the end (causing the "target of repeat operator is invalid" error).I found this while working on a fix for #98 (See #165).
The text was updated successfully, but these errors were encountered: