question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Script tag in HTML files breaks highlighting subsequent HTML tags

See original GitHub issue

When I have a script tag, it breaks all subsequent closes tags (i.e., the closing </script>, </body>, and </html> in this screenshot):

screen shot 2018-06-01 at 11 41 13 am

I noticed that if I have a bad type attribute, then highlighting the closing tags is correct, although the JS highlighting in the script tag is disabled:

screen shot 2018-06-01 at 11 42 05 am

I think this is related to this repo, since when I disable this theme, highlighting appears correct.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
romellemcommented, Jun 2, 2018

Ah ha! Good suggestion.

Looks like this extension Sublime Babel is causing compatibility issues. When I disable that extension, everything highlights as you’d expect.

Thanks again for the troubleshooting tip.

screen shot 2018-06-01 at 8 13 54 pm-fs8
1reaction
hrdtbscommented, Dec 21, 2018

Babel JavaScript is causing this issues too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Javascript syntax highlighting it not working
I have an .html file which is part of a large project, and in the middle of the file, syntax highlighting just flat...
Read more >
Syntax Highlighting for HTML inside x-template script tags ...
For context, I'm using scripts of type x-template to create Vue. js components inside a file saved with a . html extension.
Read more >
Presenting Code
Presenting Code. reveal.js includes a powerful set of features aimed at presenting syntax highlighted code — powered by highlight.js.
Read more >
Tags used in HTML
This is a list of tags used in the HTML language. Each tag starts with a tag opener (a less than sign) and...
Read more >
JavaScript: Search Keyword Highlighting
As the script encounters and highlights different keywords the colour used for each is remembered so that the same keyword can be highlighted...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found