-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
[coffeescript] syntax highlighting broken when divide symbol is not separated using space #499
Comments
We use the text mate grammar from https://github.com/textmate/coffee-script.tmbundle |
This issue was moved to textmate/coffee-script.tmbundle#8 |
I can confirm, using the same textmate bundle in sublime works, so this must have something to do with vscode. |
Hooray! |
Yes, I know. The '/' character is both used for division and the start of a regex. I can try to do some more tricks but from what I understand, only a context sensitive parser can get it 100% right. |
Can we at least change it to match only one line.. regexp with single '/' will always be in single line as opposed to a regexp block |
We process line by line, so the lookahead can only match on the current line. Did I miss anything? |
Yeah lookahead will only match the current line, however tokeniser definition currently have For egs:
The text |
@vedanshujain Thanks for the explanation. I understand. To make sure we won't match on multiple lines, I added the look ahead to the begin pattern. |
The text was updated successfully, but these errors were encountered: