-
Notifications
You must be signed in to change notification settings - Fork 48
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
$(function {}) syntax highlighting failed #103
Comments
Hey, Sorry for the slow response, I got as far as reproducing the issue on master, but haven't fixed it yet. It seems the syntax highlighter gets very confused by the Javascript curly braces, you can make it do all sorts of weird things... I'm not really sure why is this happening, but if you have time have a look and play with the Javascript script tag (https://github.com/daaain/Handlebars/blob/master/grammars/Handlebars.json#L148) and Handlebars type script tag (https://github.com/daaain/Handlebars/blob/master/grammars/Handlebars.json#L696) to see if detection can be improved. There are a couple of files to test with, none of the currently supported features should break: https://github.com/daaain/Handlebars/tree/master/test |
That's ok. |
I tested on VSCode insider v1.35, issue has been fixed. |
Hmm, that's really odd as their commit only pulled in the latest changes from this repo which only had an unrelated fix: microsoft/vscode@45db52b#diff-d15d8c6b4b1f6cdcdb925a0f62644dedR9 It's definitely still an issue in Sublime Text though where I tested, but since the way Javascript is handled is by using the existing language grammar definition in the editor I guess there can be inconsistencies. Anyway, I think it's best to keep the issue open for now just to keep an eye on it. |
Look at the gif.
syntax highlighting failed when "$(function () {" entered.
syntax highlighting good when "$(function () {" commented
The text was updated successfully, but these errors were encountered: