diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-10-13 22:14:41 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-10-13 22:14:41 +0100 |
| commit | e04d054a1b414e843fa6d6f5ee1ae75c0df533b1 (patch) | |
| tree | 4e6acf783e9ec47bbd47da9a7cc87e8093177209 /lib/html | |
| parent | aac776b1711d1e286812035a28108c622e73994a (diff) | |
Reuse matchesElement from HTML paths
Diffstat (limited to 'lib/html')
| -rw-r--r-- | lib/html/simplify.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/html/simplify.js b/lib/html/simplify.js index 52a1b0a..291e5d4 100644 --- a/lib/html/simplify.js +++ b/lib/html/simplify.js @@ -29,7 +29,7 @@ function simplifyNodes(nodes) { nodes.map(simplify).forEach(function(child) { var lastChild = children[children.length - 1]; - if (child.type === "element" && !child.tag.fresh && lastChild && _.isEqual(lastChild.tag, child.tag)) { + if (child.type === "element" && !child.tag.fresh && lastChild && child.tag.matchesElement(lastChild.tag)) { child.children.forEach(function(grandChild) { // Mutation is fine since simplifying elements create a copy of the children. lastChild.children.push(grandChild); |
