jcberquist / sublimetext-cfml

CFML (ColdFusion and Lucee) package for Sublime Text
MIT License
115 stars 24 forks source link

JS syntax highlighting #89

Closed bmitrano825 closed 7 years ago

bmitrano825 commented 7 years ago

After my CFML plugin updated, the color highlighting of JQuery seems to have broken. The issue seems to come from the use of '#' at the beginning of a JS snippet to target an ID getting confused with the CF #. Here is an example of the issue. You'll notice that most of the text is now yellow when in the past it would be helpfully highlighted.

sketch

jcberquist commented 7 years ago

If it updated just now, could you restart ST and see if that fixes it?

Also, I see on line 96 that it is unhappy with the ) and nothing is being matched correctly after that. Could you take a look at the syntax before that line?

bmitrano825 commented 7 years ago

Hello,

This is just one file. I have hundreds of other files that are also not highlighting as they were in the past. I'm currently downloading and trying older versions of this plugin to see if the issue is still there. I appreciate the work you do for this plugin and have been using it for quite some time with no issues before.

bmitrano825 commented 7 years ago

I just installed v0.24 and the issue is gone. sketch

jcberquist commented 7 years ago

Right, I agree that I broke something. But in order to figure out what the issue is, I need to see the syntax that is actually breaking. My point regarding the first broken syntax is that something is already wrong at line 96, so I need to see more of what comes before that line.

bmitrano825 commented 7 years ago

Hmm. Very strange. I just uninstalled and reinstalled the package for about the 15th time and when I put it back to 25.1 to get a screenshot of the syntax for you it looks like its corrected itself and I am unable to replicate the issue. It seems fixed on all files as well.

Sorry to bother you. Still not sure what caused it, but if you want to look into it further I'm happy to help out even though I am no longer seeing it on this side.

jcberquist commented 7 years ago

Ok, glad it is sorted out. I do think that after the package updates, it is a good idea to restart ST to ensure everything is loaded properly.

Assuming you did that, it is not clear to me why it would continue erroring like that for you. The CFML syntax is somewhat complicated in the end since it has to include JavaScript, CSS, and SQL syntaxes within it. It is possible there was some weird interplay between the syntax caches and files that stayed open between restarts. Let me know if it recurs.