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

Syntax highlighting broken for division operator; thinks a regex has started. #127

Open
steveluscher opened this issue Mar 20, 2013 · 2 comments

Comments

@steveluscher
Copy link

I don't know if this is the right place to do this. The TM2 bundle repository doesn't have an issue tracker attached to it.

From Bartłomiej Kubiak on the Textmate mailing list:

CoffeeScript bundle has broken syntax highlighting 
when using division operator ("/") - badly interprets it 
as start of regexp…

Syntax highlighting broken with the division operator - example

This might be the culprit.

steveluscher referenced this issue in textmate/coffee-script.tmbundle Mar 20, 2013
This matches the individual components of the regular expression and prevents escaping issues.

Fixes jashkenas#26 & jashkenas#105.
@infininight
Copy link
Contributor

The way we solve this in the ruby grammar is a look-behind that checks to see if the preceding characters are indicative of starting a regular expression match. This may be possible with Coffeescript as well but would take someone better versed in the language than I.

@DonGiulio
Copy link

I have the same problem, I found that the highlighting is only broken when the / division sign is attached to the following string without any space.

i.e. this breaks the highlighting
return multiples/quantities
this doesn't
return multiples/ quantities

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

3 participants