1
0
mirror of https://github.com/svg/svgo.git synced 2025-07-31 07:44:22 +03:00

plugins/removeComments: ignore comments which starts with 'git st' (close (#43)

This commit is contained in:
deepsweet
2012-11-18 18:17:46 +02:00
parent b64a4c07cf
commit 1abee24a34
3 changed files with 11 additions and 1 deletions

View File

@ -13,6 +13,8 @@
*/ */
exports.removeComments = function(item, params) { exports.removeComments = function(item, params) {
return !item.comment; if (item.comment && item.comment.charAt(0) !== '!') {
return false;
}
}; };

View File

@ -0,0 +1,4 @@
<!--!ignored comment-->
<svg xmlns="http://www.w3.org/2000/svg">
test
</svg>

After

Width:  |  Height:  |  Size: 81 B

View File

@ -0,0 +1,4 @@
<!--!ignored comment-->
<svg xmlns="http://www.w3.org/2000/svg">
test
</svg>

After

Width:  |  Height:  |  Size: 81 B