vscode-remove-comments icon indicating copy to clipboard operation
vscode-remove-comments copied to clipboard

Feature Request: Remove Comments in HTML

Open SteveKennedy opened this issue 7 years ago • 4 comments

For Example:

From:

<div>
<!-- This is a comment -->
This is real content.
</div>

To:

From:

<div>
This is real content.
</div>

SteveKennedy avatar Jul 15 '18 19:07 SteveKennedy

I second this. Much needed.

saifalfalah avatar Jul 20 '19 22:07 saifalfalah

I know this is a really old request, but for anyone stumbling upon this in the future.

Go into Search mode.

Type <!--(.*?)-->. Enable the REGEX search function. (third button next to the search input box). Select the arrow to the left, make sure the second input field is empty. Search, and then replace. Works like a charm :)

Joshdw avatar Sep 08 '19 23:09 Joshdw

I know this is a really old request, but for anyone stumbling upon this in the future.

Go into Search mode.

Type <!--(.*?)-->. Enable the REGEX search function. (third button next to the search input box). Select the arrow to the left, make sure the second input field is empty. Search, and then replace. Works like a charm :)

u saved my day :_)

brunoespi avatar Oct 20 '22 10:10 brunoespi

For multiline comments:

<!--(.|\n)*?-->

five23 avatar May 31 '23 18:05 five23