jskinner / DefaultPackages

Old bug tracker for Sublime Text's "Default Packages", e.g. bad syntax highlighting
http://web.archive.org/web/20150524043750/https://www.sublimetext.com/forum/viewtopic.php?f=2&t=12095
26 stars 2 forks source link

Default html syntax highlighting incorrect for script tag #165

Closed AlekseyMalyshev closed 8 years ago

AlekseyMalyshev commented 8 years ago

Default html package highlights entire line that contains a script tag. I believe it should highlight only what is in between the tags. I.e., embedded JavaScript code.

2b5ba0d4-9b0e-11e5-9732-0fc976550321

Also I think that this incorrect parsing creates a problem described here:

https://github.com/SublimeTextIssues/Core/issues/43

I think the problem is that when choosing what type of comment ST3 should insert, it uses the information from html parser.

FichteFoll commented 8 years ago

You're right in that this issue is related and also partly responsible for the problem in SublimeTextIssues/Core#43, but only partly. I mentioned both of the responsible faults in my first comment, which is now split in two thanks to this issue. Which is good, don't get me wrong.

FichteFoll commented 8 years ago

This has been fixed partly in that the source.js scope is now only applied starting after <script and ending before </script>. The src="..."> part is still being marked as source.js however.

AlekseyMalyshev commented 8 years ago

Yes, I can see it in the latest version. Thanks!

FichteFoll commented 8 years ago

Should be resolved via https://github.com/sublimehq/Packages/commit/d056ca685c90dfd0a8f55e1e76b52695c2ea043b. Will likely be shipped in 3108.

wbond commented 8 years ago

This was fixed back in 3108