diff --git a/src/lib/annotations/annotations.html b/src/lib/annotations/annotations.html index 3c96a26baf..019aeea20f 100644 --- a/src/lib/annotations/annotations.html +++ b/src/lib/annotations/annotations.html @@ -236,6 +236,8 @@ // optionally strip whitespace if (stripWhiteSpace && !node.textContent.trim()) { root.removeChild(node); + // decrement index since node is removed + i--; } } // if this node didn't get evacipated, parse it. diff --git a/test/unit/template-whitespace.html b/test/unit/template-whitespace.html index 8f78bc862e..5f17145f21 100644 --- a/test/unit/template-whitespace.html +++ b/test/unit/template-whitespace.html @@ -96,6 +96,36 @@ + + + + + + + +