Used Element::append_text instead of append_text_node in TreeBuilder::process_text to prevent weird splitting of text when there is no element in between.

This commit is contained in:
Werner Kroneman 2024-01-29 23:29:09 +01:00 committed by Werner Kroneman
parent f54776ca0a
commit 65c91439f8

View file

@ -97,7 +97,7 @@ impl TreeBuilder {
fn process_text(&mut self, text: String) { fn process_text(&mut self, text: String) {
if self.depth() > 0 { if self.depth() > 0 {
let top = self.stack.len() - 1; let top = self.stack.len() - 1;
self.stack[top].append_text_node(text); self.stack[top].append_text(text);
} }
} }