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

Syntax highlighting on multiline comments #403

Closed
titoBouzout opened this issue Apr 16, 2021 · 4 comments
Closed

Syntax highlighting on multiline comments #403

titoBouzout opened this issue Apr 16, 2021 · 4 comments

Comments

@titoBouzout
Copy link

There's seems to be some issues with multiline comments

;(function () {
  'use strict'

  /* asd 
   */

  function test(){

  }
})(this)

shows as

030786d89b 1

adding the semicolon to the end of use strict fix it

9795156bd6 1

this file is also giving problems

8c2d13d923 1

also adding the semicolon to just before the comment fixes it, have the file to test it
dom-to-image.txt

@Thom1729
Copy link
Contributor

Sorry I missed this a couple days ago. I can confirm this is broken. Neither the core syntax nor JS Custom with default settings has this problem, so it must be a bug in one of the JS Custom extensions that babel-sublime is using. I wasn't planning to mess with v10 any more, but this has to be fixed. Hopefully it shouldn't take an hour.

@Thom1729
Copy link
Contributor

Minimal example:

{
  ''/**/

  ''
  /**/
}

The second fails. It some kind of issue with the automatic semicolon insertion code for expression statements, but that should be identical to core, which doesn't have this problem. I almost wonder if it's some kind of bizarre parser corner case.

@Thom1729
Copy link
Contributor

v10.0.5 is out with a fix. It turns out this was already fixed in core for ST4, so this won't be an issue in v11.

@titoBouzout
Copy link
Author

awesome, thank you I can confirm its fixed

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