Inline JavaScript Highlighting


Is there a plugin, or is it possible to have Atom highlight the syntax of JavaScript when it is contained within <script></script> tags inside an HTML file? As it stands, it appears to ignore the code.

I’ve tried several different themes, and they all exhibit the same behavior.


works fine here! (default OneDark syntax theme as well as several others tested)


Same here. It works fine for me.

Are you sure HTML is selected as the language scheme?


The file is HTML, but it’s not a complete file with html, head, and body tags. It’s meant to be an include (I’m working with Google Polymer). I can get the highlighting to work if I wrap it in a div, but I don’t want to do that.



Interesting. I suppose that’s a case for the language-html parser, to perhaps not rely on html tags being present.

That said, have you seen this Polymer-related issue on the main repo?
There may be some talk about how to handle template files.


I confirm, I have the same problem when trying to migrate from Sublime to Atom for web-components/polymer development.

I’ve posted an issue to language-html parser, I hope the problem is explained clearly enough and that somebody will take a look on it…