Skip to content

Commit 2ff293f

Browse files
sparhamiBrendan Linn
authored andcommitted
Do not remove empty raw text nodes
- Removing logic that skipped empty text nodes when transforming HTML. The space whitespace may occur in a place where it needs to be preserved. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=105716845
1 parent cceb8e7 commit 2ff293f

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

java/src/com/google/template/soy/html/passes/HtmlTransformVisitor.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -448,11 +448,6 @@ private void consumeCharacter(RawTextNode node, char c) {
448448
// Mark all visited RawTextNodes for removal. A single RawTextNode may not map to any Html*Nodes
449449
// by itself, but we still want to remove it.
450450
visitedRawTextNodes.add(node);
451-
452-
// Just skip empty nodes
453-
if (CharMatcher.WHITESPACE.matchesAllOf(content)) {
454-
return;
455-
}
456451

457452
for (int i = 0; i < content.length(); i += 1) {
458453
consumeCharacter(node, content.charAt(i));

0 commit comments

Comments
 (0)