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

[JavaScript] \u1234 not recognized as function name! #1679

Closed
bounc3-paradise-on-e opened this issue Aug 6, 2018 · 1 comment
Closed

[JavaScript] \u1234 not recognized as function name! #1679

bounc3-paradise-on-e opened this issue Aug 6, 2018 · 1 comment

Comments

@bounc3-paradise-on-e
Copy link

Hello!

Take a look at this:

+function \u1234(){}/1//*

console.log('THIS IS NOT A COMMENT!');

//*/

the line containing console.log is highlighted like a comment, while it isn't. The problem, is, I think, that st doesn't recognize \u1234 as a function name and then it probably thinks that {} is an object and therefore it thinks that /1/ is a regular expression, and then it thinks that /* is start of a multiline comment, and so on, until it reaches the second line and highlights actual code like a comment and messes everything up!

I did my best to format this code snippet like it is formated in the table in issue #1600, I hope I did it correctly. Couldn't attach screenshot atm.

This must be fixed, I think. Any opinions?

@Thom1729
Copy link
Collaborator

Thom1729 commented Aug 6, 2018

I never got around to implementing unicode escapes in JavaScript identifiers, partly because I thought they were more complicated than they actually are and partly because no one has ever noticed that they weren't supported. The new PR should solve your problem.

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

2 participants