remove comments in traverse.removeProperties
This commit is contained in:
@@ -80,6 +80,16 @@ traverse.removeProperties = function (tree) {
|
||||
delete node.start;
|
||||
delete node.end;
|
||||
delete node.loc;
|
||||
|
||||
clearComments(node.trailingComments);
|
||||
clearComments(node.leadingComments);
|
||||
};
|
||||
|
||||
var clearComments = function (comments) {
|
||||
_.each(comments, function (comment) {
|
||||
delete comment.extendedRange;
|
||||
clear(comment);
|
||||
});
|
||||
};
|
||||
|
||||
clear(tree);
|
||||
|
||||
Reference in New Issue
Block a user