mirror of
https://github.com/soywod/himalaya.git
synced 2024-09-29 12:31:13 +00:00
remove also tabs from text parts (#280)
This commit is contained in:
parent
c1841a2932
commit
134af358e3
|
@ -106,7 +106,7 @@ impl Msg {
|
||||||
.replace_all(&sanitized_html, " ")
|
.replace_all(&sanitized_html, " ")
|
||||||
.to_string();
|
.to_string();
|
||||||
// Merge new line chars
|
// Merge new line chars
|
||||||
let sanitized_html = Regex::new(r"(\r?\n *){2,}")
|
let sanitized_html = Regex::new(r"(\r?\n[\t ]*){2,}")
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.replace_all(&sanitized_html, "\n\n")
|
.replace_all(&sanitized_html, "\n\n")
|
||||||
.to_string();
|
.to_string();
|
||||||
|
@ -115,7 +115,7 @@ impl Msg {
|
||||||
|
|
||||||
sanitized_html
|
sanitized_html
|
||||||
} else {
|
} else {
|
||||||
let sanitized_plain = Regex::new(r"(\r?\n *){2,}")
|
let sanitized_plain = Regex::new(r"(\r?\n[\t ]*){2,}")
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.replace_all(&plain, "\n\n")
|
.replace_all(&plain, "\n\n")
|
||||||
.to_string();
|
.to_string();
|
||||||
|
|
Loading…
Reference in a new issue