From e04d054a1b414e843fa6d6f5ee1ae75c0df533b1 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Tue, 13 Oct 2015 22:14:41 +0100 Subject: Reuse matchesElement from HTML paths --- lib/html/simplify.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/html') 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); -- cgit v1.2.3