Packages: wrong highlight

Created on 18 May 2018  路  6Comments  路  Source: sublimehq/Packages

  • 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:

2839295d2860247b6128297d247b312f693f612869293a317d6029

The test case file can be downloaded here

Screenshot

All 6 comments

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

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.

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:

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

@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

Closing this, because I opened another issue: #1600

Was this page helpful?
0 / 5 - 0 ratings

Related issues

iamntz picture iamntz  路  4Comments

lucidsushi picture lucidsushi  路  3Comments

MiChAeLoKGB picture MiChAeLoKGB  路  4Comments

mouse07410 picture mouse07410  路  3Comments

jfcherng picture jfcherng  路  3Comments