mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 05:29:20 +03:00
Resolve issue #143
This commit is contained in:
parent
96e2e6576c
commit
47b75755c4
2 changed files with 22 additions and 28 deletions
|
|
@ -81,7 +81,9 @@ export function htmlToPlain(html) {
|
|||
.replace(/"/gi, '"')
|
||||
.replace(/<[^>]*>/gm, '');
|
||||
|
||||
text = tpl.content.textContent
|
||||
text = tpl.content.textContent;
|
||||
if (text) {
|
||||
text = text
|
||||
.replace(/\n[ \t]+/gm, '\n')
|
||||
.replace(/[\n]{3,}/gm, '\n\n')
|
||||
.replace(/>/gi, '>')
|
||||
|
|
@ -89,6 +91,7 @@ export function htmlToPlain(html) {
|
|||
.replace(/&/gi, '&')
|
||||
// wordwrap max line length 100
|
||||
.match(/.{1,100}(\s|$)|\S+?(\s|$)/g).join('\n');
|
||||
}
|
||||
|
||||
while (0 < --limit) {
|
||||
iP1 = text.indexOf('__bq__start__', pos);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue