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

Incorrect precedence for regex and comment highlighting #41

Open
mngyuan opened this issue Jul 24, 2014 · 2 comments
Open

Incorrect precedence for regex and comment highlighting #41

mngyuan opened this issue Jul 24, 2014 · 2 comments
Labels

Comments

@mngyuan
Copy link

mngyuan commented Jul 24, 2014

If a line contains a slash and a comment, the plugin highlights the text from the slash to the comment as a regex, then fails to highlight the comment.

var result = 1 / 2; // this is a comment, but it won't be highlighted
var block = 2 / 3; /* this also will consider /3;/ as a regex */
@mngyuan
Copy link
Author

mngyuan commented Jul 29, 2014

default vim syntax highlighting also gets this behavior wrong

@jelera
Copy link
Owner

jelera commented Aug 1, 2014

Yes, I see it too. The regex to match the JavaScript regexes is quite complex. I'll suggest to stick with // as your line comments for now.

@jelera jelera added the Bug label Aug 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants