mirror of
https://github.com/soywod/himalaya.git
synced 2024-07-08 10:35:13 +00:00
remove variation selectors from table cells (#300)
This commit is contained in:
parent
4e24d04faf
commit
6b920cbe76
|
@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Some emojis break the table layout [#300]
|
||||||
|
|
||||||
## [0.5.7] - 2022-03-01
|
## [0.5.7] - 2022-03-01
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@ -452,6 +456,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
[#280]: https://github.com/soywod/himalaya/issues/280
|
[#280]: https://github.com/soywod/himalaya/issues/280
|
||||||
[#288]: https://github.com/soywod/himalaya/issues/288
|
[#288]: https://github.com/soywod/himalaya/issues/288
|
||||||
[#289]: https://github.com/soywod/himalaya/issues/289
|
[#289]: https://github.com/soywod/himalaya/issues/289
|
||||||
|
[#300]: https://github.com/soywod/himalaya/issues/300
|
||||||
[#303]: https://github.com/soywod/himalaya/issues/303
|
[#303]: https://github.com/soywod/himalaya/issues/303
|
||||||
[#305]: https://github.com/soywod/himalaya/issues/305
|
[#305]: https://github.com/soywod/himalaya/issues/305
|
||||||
[#308]: https://github.com/soywod/himalaya/issues/308
|
[#308]: https://github.com/soywod/himalaya/issues/308
|
||||||
|
|
|
@ -35,7 +35,12 @@ pub struct Cell {
|
||||||
impl Cell {
|
impl Cell {
|
||||||
pub fn new<T: AsRef<str>>(value: T) -> Self {
|
pub fn new<T: AsRef<str>>(value: T) -> Self {
|
||||||
Self {
|
Self {
|
||||||
value: String::from(value.as_ref()).replace(&['\r', '\n', '\t'][..], ""),
|
// Removes carriage returns, new line feeds, tabulations
|
||||||
|
// and [variation selectors].
|
||||||
|
//
|
||||||
|
// [variation selectors]: https://en.wikipedia.org/wiki/Variation_Selectors_(Unicode_block)
|
||||||
|
value: String::from(value.as_ref())
|
||||||
|
.replace(&['\r', '\n', '\t', '\u{fe0e}', '\u{fe0f}'], ""),
|
||||||
..Self::default()
|
..Self::default()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue