-
Notifications
You must be signed in to change notification settings - Fork 74
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
Scripts that are not javascript are not highlighted correctly. #43
Comments
Can you explain what you mean by |
In jade, if you want to write inline javascript, you have to use:
which is compiled to
notice the
in fact it might not be compiled at all because it's a syntax error. In which case, this line should be highlighted as jade instead of javascript. Note that sometimes this is actually very important because angular can store some html templates inside of a
but currently the template is highlighted as javascript, instead of jade. TL;DR: My suggestion is, after
|
Got it. I'll get this updated. |
Again, thank you for all the work. It's an amazing plugin. Just out of curiosity, why you devoted so much time for a jade plugin if you are not using jade so often? |
I was immediately interested in Jade so I quickly converted vim-haml over to a separate Jade plugin. I have only used it in passing, but I keep the plugin updated for those that use it. |
Thank you. Note also that the same problem is with the
|
These might take me a while to fix. I'm approaching the limits of my Vim syntax understanding. |
You don't use jade? Hehehe. I use your syntax highlighter for Jade and Blade. It's great! :D I'm not a fan of Jade's forced switch to |
FWIW, I have a workaround for this that I've been using for a while now: http://derickbailey.com/2014/05/07/polyfill-the-template-element-with-jade-mixins/ |
I'm planning on improving tag handling both inside and outside of trailing-"." tag blocks. I'll look at this afterward. Frankly I was confused by the javascript handling in the syntax file, but reading this thread I think I'm starting to get it. |
Thank you for all the help @jessaustin |
For example, when writing an angular app, you can write some
ng-template
in inline:In the above example, the code should be highlighted as jade. And for good reason: the
script
tag is not followed by a.
, indicating that the following code, compiled by jade, will become tags anyways. So it is not reasonable to highlight them as anything but jade code.The text was updated successfully, but these errors were encountered: