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

wrong highlight #1589

Closed
user-982634 opened this issue May 18, 2018 · 6 comments
Closed

wrong highlight #1589

user-982634 opened this issue May 18, 2018 · 6 comments

Comments

@user-982634
Copy link

  • Language: JavaScript
  • Sublime version: 3.0 build 3143
  • Color scheme: Monaki

Issue

Division operator is colored like it is a regular expression.

Test case

Raw code:

~(m,j
/Q,f)(y|Y)<s(N),i,o=i=>a[a(9)](`${a()}${1/i?a(i):1}`)

JSON encoded:

"~(m,j\n/Q,f)(y|Y)<s(N),i,o=i=>a[a(9)](`${a()}${1/i?a(i):1}`)"

Base64 encoded:

fihtLGoKL1EsZikoeXxZKTxzKE4pLGksbz1pPT5hW2EoOSldKGAke2EoKX0kezEvaT9hKGkpOjF9YCk=

UTF-8 hexadecimal encoded:

7e286d2c6a0a2f512c662928797c59293c73284e292c692c6f3d693d3e615b61
2839295d2860247b6128297d247b312f693f612869293a317d6029

The test case file can be downloaded here

Screenshot

@keith-hall
Copy link
Collaborator

have you tried with a more recent build of ST or the version of the syntax definition from this repo?

@user-982634
Copy link
Author

Thank you, you are right, the problem was old version of sublime.

It took me a while to find a working and virus-free torrent, but I finally found it and I installed version 3.1.1 build 3176 and properly cracked it, and it now works perfectly. The syntax highlighting is correct now.

Thanks for help.

@user-982634
Copy link
Author

user-982634 commented May 18, 2018

Hey, but I've just noticed there is another issue with the latest sublime version: the following if statement is not colored properly:

try{}catch{}if(0);

I didnt see such issue in old version. can this be fixed somehow?

This is what I am talking about:

@Thom1729
Copy link
Collaborator

The binding identifier in catch statements is not optional; your code is invalid. I have opened a PR to improve highlighting in this situation.

@user-982634
Copy link
Author

user-982634 commented May 18, 2018

@Thom1729

The binding identifier in catch statements is not optional; your code is invalid.

Sorry, but incomplete catch block statements are approved by TC39 and such syntax is implemented in all modern browsers (Chrome, Firefox) and is implemented in Node.js, so I think it is considered as a valid syntax.

But anyway thanks for the fix, amazing!


Edit

here is another issue, please fix this too:

I mean, functional arguments are not colored

@user-982634
Copy link
Author

Closing this, because I opened another issue: #1600

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