diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-11-14 21:02:47 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-11-14 21:07:30 +0000 |
| commit | fba50901e45483a339a16334b628271f770baddf (patch) | |
| tree | 17c80a2959f8d2bca25fa19e3d890a7862f4dc81 /lib/html | |
| parent | 443ad6fcbef7734e8b91d8082a0583ce2165c446 (diff) | |
Use separator during simplification
Diffstat (limited to 'lib/html')
| -rw-r--r-- | lib/html/simplify.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/html/simplify.js b/lib/html/simplify.js index 081c3f8..e05bde2 100644 --- a/lib/html/simplify.js +++ b/lib/html/simplify.js @@ -37,6 +37,9 @@ function identity(value) { function appendChild(children, child) { var lastChild = children[children.length - 1]; if (child.type === "element" && !child.tag.fresh && lastChild && lastChild.type === "element" && child.tag.matchesElement(lastChild.tag)) { + if (child.tag.separator) { + appendChild(lastChild.children, ast.text(child.tag.separator)); + } child.children.forEach(function(grandChild) { // Mutation is fine since simplifying elements create a copy of the children. appendChild(lastChild.children, grandChild); |
