writer: trim newlines when writing from Element

This commit is contained in:
Matt Bilker
2019-01-31 17:25:53 +00:00
parent bbea3a4815
commit 072a1eb7df

View File

@@ -123,7 +123,7 @@ impl Writeable<Element> 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 {