From 072a1eb7df807fa35ee1a9ac1fa687a2f1350c8c Mon Sep 17 00:00:00 2001 From: Matt Bilker Date: Thu, 31 Jan 2019 17:25:53 +0000 Subject: [PATCH] writer: trim newlines when writing from Element --- src/writer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {