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
|
## 2.2.0
|
||||||
|
|
||||||
* Make `system` module formatter modules anonymous by default.
|
* Make `system` module formatter modules anonymous by default.
|
||||||
|
* Fix duplicate comments being output, breaking code.
|
||||||
|
|
||||||
## 2.1.0
|
## 2.1.0
|
||||||
|
|
||||||
|
|||||||
@ -293,8 +293,9 @@ t.removeComments = function (child) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
t.inheritsComments = function (child, parent) {
|
t.inheritsComments = function (child, parent) {
|
||||||
child.leadingComments = _.compact([].concat(child.leadingComments, parent.leadingComments));
|
_.each(["leadingComments", "trailingComments"], function (key) {
|
||||||
child.trailingComments = _.compact([].concat(child.trailingComments, parent.trailingComments));
|
child[key] = _.uniq(_.compact([].concat(child[key], parent[key])));
|
||||||
|
});
|
||||||
return child;
|
return child;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user