mirror of
https://github.com/svg/svgo.git
synced 2025-07-31 07:44:22 +03:00
Convert to xast doctype, instruction and comment nodes
Here we add [xast](https://github.com/syntax-tree/xast) support to three basic nodes: doctype, instruction and comment Some tests are rewritten instead of checking each field to `.include` assertion which is able to match shape of object.
This commit is contained in:
@ -19,7 +19,7 @@ exports.description = 'removes comments';
|
||||
* @author Kir Belevich
|
||||
*/
|
||||
exports.fn = function (item) {
|
||||
if (item.comment && item.comment.charAt(0) !== '!') {
|
||||
if (item.type === 'comment' && item.value.charAt(0) !== '!') {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user