fix table with subject containing \r\n(#141)

This commit is contained in:
Clément DOUIN
2021-05-03 14:23:23 +02:00
parent 05b0274725
commit e07e72f497
2 changed files with 8 additions and 1 deletions
+5
View File
@@ -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
+3 -1
View File
@@ -39,7 +39,9 @@ impl Cell {
pub fn new<T: AsRef<str>>(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,
}
}