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:
@ -13,6 +13,8 @@
|
||||
*/
|
||||
exports.removeComments = function(item, params) {
|
||||
|
||||
return !item.comment;
|
||||
if (item.comment && item.comment.charAt(0) !== '!') {
|
||||
return false;
|
||||
}
|
||||
|
||||
};
|
||||
|
4
test/plugins/removeComments.02.orig.svg
Normal file
4
test/plugins/removeComments.02.orig.svg
Normal file
@ -0,0 +1,4 @@
|
||||
<!--!ignored comment-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
test
|
||||
</svg>
|
After Width: | Height: | Size: 81 B |
4
test/plugins/removeComments.02.should.svg
Normal file
4
test/plugins/removeComments.02.should.svg
Normal file
@ -0,0 +1,4 @@
|
||||
<!--!ignored comment-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
test
|
||||
</svg>
|
After Width: | Height: | Size: 81 B |
Reference in New Issue
Block a user