The package has been renamed to Nest Comments, and now supports both the HTML syntax of commenting <!-- --> and the CSS syntax /* */.
The problem: if your code contains a comment, and you want to add a new comment to temporarily disable a block or portion of code, the built in commenting functionality does not actually place the comment tags in expected locations. If an existing comment is included in the content being commented out, the first instance of a --> or */ closing comment tag will end the entire comment.
The solution: The extension very simply finds all comments within the highlighted block of code and converts dashes to tildes, and then places the comment tags in the expected locations. It also then reverses the effect to un-comment the same code.
If you need to comment out a portion of your code that includes pre-existing comments, the native commenting functionality will not comment properly or preserve your existing comments. This extension will maintain your original comments and allow you to quickly toggle comments on sections of code.
<main role="main">
<!-- A comment that's very important -->
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit.</p>
</main>Becomes:
<!-- <main role="main">
<!~~ A comment that's very important ~~>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit.</p>
</main> -->body {
/* margin: 0; */
}Becomes:
/* body {
/~ margin: 0; ~/
} */The following file formats are supported:
- asp
- cfm
- css
- htm
- html
- md
- njk
- php
- svg
- vue
- xml
None at this time 😃
Full release notes are available in the CHANGELOG file.
