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 highlighting of RegExp literal with / in character class #14

Open
kevinoid opened this issue Feb 25, 2017 · 0 comments
Open

Comments

@kevinoid
Copy link

The grammar for RegExp literals in ES6 allows / to appear without a preceding \ in character class expressions (see RegularExpressionClassChar in the grammar). However, vim-es6 highlights such expressions incorrectly. For example, in the following:

/foo[/]bar/

vim-es6 does not highlight ]bar/ as part of the regular expression.

Note that this is made more significant by the the ESLint no-useless-escape rule (which is enabled by popular configurations such as the airbnb config) which produces a warning when \ is added.

Thanks,
Kevin

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

1 participant