diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bfd677..083ccf6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Table with subject containing `\r` or `\n`[#141] + ## [0.3.0] - 2021-04-28 ### Fixed @@ -225,3 +229,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [#131]: https://github.com/soywod/himalaya/issues/131 [#132]: https://github.com/soywod/himalaya/issues/132 [#133]: https://github.com/soywod/himalaya/issues/133 +[#141]: https://github.com/soywod/himalaya/issues/141 diff --git a/src/table.rs b/src/table.rs index 50a36e9..8459dec 100644 --- a/src/table.rs +++ b/src/table.rs @@ -39,7 +39,9 @@ impl Cell { pub fn new>(value: T) -> Self { Self { styles: Vec::new(), - value: String::from(value.as_ref()), + value: String::from(value.as_ref()) + .replace("\r", "") + .replace("\n", ""), shrinkable: false, } }