f doing it on a single line, HTML comments tags <!-- -->
This kind of issue is already filed for CSS, but the reason is the same.
It has to do with how those html comments are implemented, which exist for backward compatibility reasons as scripts/css needed to be commented out in the early days of Internet Explorer.
I’ve done some investigation about it, but haven’t found a solution to maintain both, compatibility with such leading/trailing html comments and fix the described issue.
When trying to toggle a comment on multiple lines in a <script> tag, nothing will happen.
Also related with those special comments. This bug exists for ages - it seems. I can reproduce it in ST3 as well.
Funnily wasn’t with my normal setup which loads latest syntax PRs merged, but it made identifying the issue easy.
The fix for that issue is part of: