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

Regex literal executed on single line or after semi-colon #8

Closed
Shazwazza opened this issue Apr 30, 2016 · 0 comments
Closed

Regex literal executed on single line or after semi-colon #8

Shazwazza opened this issue Apr 30, 2016 · 0 comments
Labels

Comments

@Shazwazza
Copy link
Owner

This will not work:

var i=0;
/android.*safari.*/i.test(i) && !i;

Even though the second line is irrelavent and is a no-op function, it is still valid JS but we end up with an unterminated regex literal error.

@Shazwazza Shazwazza added the bug label Apr 30, 2016
@Shazwazza Shazwazza changed the title Regex literal executed on single line Regex literal executed on single line or after semi-colon Apr 30, 2016
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

1 participant