mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-16 20:57:53 +08:00
remove variation selectors from table cells (#300)
This commit is contained in:
+6
-1
@@ -35,7 +35,12 @@ pub struct Cell {
|
||||
impl Cell {
|
||||
pub fn new<T: AsRef<str>>(value: T) -> 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()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user