Sublime Forum

BUG - Commenting <script> tags in html files

#1

In a html file. If you comment [CMD + /] something like this:

[code]<script src="components/angular/angular.js"> </script>[/code]

you get this

// <script src="components/angular/angular.js"> </script>

which is obviously wrong and quite annoying.

0 Likes

#2

Which version are you using?
Have you installed HTML5 package?
Version 3062 with bundled HTML language works fine, but after switching syntax to html5 behaves like you described.
Anyway, if you search in the forum it’s a know issue, and more on subject, if you hit the cmd+/ twice it comments the line in semi-proper way:

    <script src="components/angular/angular.js"> </script>

cmd+/ once:

    // <script src="components/angular/angular.js"> </script>

second cmd+/:

    <!-- // <script src="components/angular/angular.js"> </script> -->

semi-proper because the // comment marker will not be removed…

0 Likes