davidrios / jade-tmbundle

A comprehensive textmate / sublime text bundle for the Jade template language.
https://github.com/davidrios/jade-tmbundle
MIT License
102 stars 31 forks source link

Highlighting of content in native JS loops seems broken. #38

Closed mathiasschopmans closed 9 years ago

mathiasschopmans commented 9 years ago

Just try the following markup:

.demo
  - for(i=0; i<5; i++)
    h1 Some text

Here's what it looks like in Sublime: screenshot

davidrios commented 9 years ago

I ran some tests here and concluded that it's an incompatibility with the ReactJS package. You have it installed right? It seems the ReactJS package replaces the source.js context, and is used instead of the original JavaScript highlighter. If you create a new file, select the ReactJS > JavaScript (JSX) highlighter and try the same code you can confirm it's a bug there. A workaround I found is to add a space after the < character.

mathiasschopmans commented 9 years ago

Good catch. You're totally right. I removed the React package and it works as expected. Thanks for investigating in this bug!

davidrios commented 9 years ago

No problem. Luckily I also had the ReactJS package installed and so was able catch the bug.