mirror of
https://github.com/soywod/himalaya.git
synced 2024-09-29 04:31:11 +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, " ")
|
||||
.to_string();
|
||||
// Merge new line chars
|
||||
let sanitized_html = Regex::new(r"(\r?\n *){2,}")
|
||||
let sanitized_html = Regex::new(r"(\r?\n[\t ]*){2,}")
|
||||
.unwrap()
|
||||
.replace_all(&sanitized_html, "\n\n")
|
||||
.to_string();
|
||||
|
@ -115,7 +115,7 @@ impl Msg {
|
|||
|
||||
sanitized_html
|
||||
} else {
|
||||
let sanitized_plain = Regex::new(r"(\r?\n *){2,}")
|
||||
let sanitized_plain = Regex::new(r"(\r?\n[\t ]*){2,}")
|
||||
.unwrap()
|
||||
.replace_all(&plain, "\n\n")
|
||||
.to_string();
|
||||
|
|
Loading…
Reference in a new issue