From 65c91439f875a43c8a2aba75594529668d7b324b Mon Sep 17 00:00:00 2001 From: Werner Kroneman Date: Mon, 29 Jan 2024 23:29:09 +0100 Subject: [PATCH] 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. --- minidom/src/tree_builder.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/minidom/src/tree_builder.rs b/minidom/src/tree_builder.rs index b991629c..5700d36a 100644 --- a/minidom/src/tree_builder.rs +++ b/minidom/src/tree_builder.rs @@ -97,7 +97,7 @@ impl TreeBuilder { fn process_text(&mut self, text: String) { if self.depth() > 0 { let top = self.stack.len() - 1; - self.stack[top].append_text_node(text); + self.stack[top].append_text(text); } }