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

JS #myPrivateClassMethod() breaks syntax highlighting #425

Closed
ch3ll0v3k opened this issue Oct 12, 2022 · 6 comments
Closed

JS #myPrivateClassMethod() breaks syntax highlighting #425

ch3ll0v3k opened this issue Oct 12, 2022 · 6 comments

Comments

@ch3ll0v3k
Copy link

sublime 3.1.1

image

@Thom1729
Copy link
Contributor

I tried a simplified version of this and could not reproduce. Most likely it was fixed at some point. If you still have this issue or a similar issue, please post the exact code that triggers the bug as text.

@ch3ll0v3k
Copy link
Author

Sure
image

class MyClass{

  #privateProp = null; // OK
  publicProp = null; // OK

  constructor(){

  }

  publicMethod(){ // OK

  }

  // this (#) private method break all syntax highlighting after it self
  #privateMethod(){

  }

  wrongSytaxtHighlighting(){
    const a = 12;
  }

  someMethod(){
    const a = 12;
  }

}
´´´

@ch3ll0v3k
Copy link
Author

image
image

@Thom1729
Copy link
Contributor

Ah, I see the issue. It looks like you're running Sublime Text 3, which won't run babel-sublime v11 or later. ST4 added powerful new syntax highlighting features that are especially relevant to the JavaScript family, and current versions of babel-sublime rely deeply on these features and provide much better highlighting.

You can fix the issue by upgrading to current versions of Sublime and babel-sublime. I acknowledge that this may not be a very helpful answer.

I'll do some thinking about the status of the v10 branch. Currently, it's not maintained and I have no plans to update it to add new features or fix bugs. If there is substantial interest in contributing patches for v10, I could set up a dedicated branch for people to work on.

@ch3ll0v3k
Copy link
Author

ahh, oke. thank you for this info!
sorr ...

@ch3ll0v3k
Copy link
Author

Awesome ))) it does work in ST4. thx

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