compact body nodes in traversal
This commit is contained in:
@@ -107,6 +107,11 @@ function traverse(parent, opts, scope) {
|
||||
|
||||
if (updated) {
|
||||
parent[key] = _.flatten(parent[key]);
|
||||
|
||||
if (key === "body") {
|
||||
// we can safely compact this
|
||||
parent[key] = _.compact(parent[key]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
handle(parent, key);
|
||||
|
||||
Reference in New Issue
Block a user