diff --git a/src/writer.rs b/src/writer.rs index 84bd706..425c09a 100644 --- a/src/writer.rs +++ b/src/writer.rs @@ -123,7 +123,7 @@ impl Writeable for Element { }, _ => { - let value = Value::from_string(node_type, &text, array_mask > 0, count as usize)?; + let value = Value::from_string(node_type, text.trim(), array_mask > 0, count as usize)?; let data = value.to_bytes()?; if array_mask > 0 {