fix duplicate comments being output, breaking code
This commit is contained in:
parent
52ffc65a06
commit
74a84e2473
@ -5,6 +5,7 @@ Gaps between patch versions are faulty/broken releases.
|
||||
## 2.2.0
|
||||
|
||||
* Make `system` module formatter modules anonymous by default.
|
||||
* Fix duplicate comments being output, breaking code.
|
||||
|
||||
## 2.1.0
|
||||
|
||||
|
||||
@ -293,8 +293,9 @@ t.removeComments = function (child) {
|
||||
};
|
||||
|
||||
t.inheritsComments = function (child, parent) {
|
||||
child.leadingComments = _.compact([].concat(child.leadingComments, parent.leadingComments));
|
||||
child.trailingComments = _.compact([].concat(child.trailingComments, parent.trailingComments));
|
||||
_.each(["leadingComments", "trailingComments"], function (key) {
|
||||
child[key] = _.uniq(_.compact([].concat(child[key], parent[key])));
|
||||
});
|
||||
return child;
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user