Neah version mail forward fix 3
This commit is contained in:
parent
8dd78f4bfb
commit
60168e70f7
@ -1347,7 +1347,7 @@ export default function MailPage() {
|
|||||||
.replace(/<p[^>]*>/gi, '\n')
|
.replace(/<p[^>]*>/gi, '\n')
|
||||||
.replace(/<\/p>/gi, '')
|
.replace(/<\/p>/gi, '')
|
||||||
.replace(/<[^>]+>/g, '')
|
.replace(/<[^>]+>/g, '')
|
||||||
.replace(/ |‌|»|«|>/g, match => {
|
.replace(/ |‌|»|«|>|<|&/g, match => {
|
||||||
switch (match) {
|
switch (match) {
|
||||||
case ' ': return ' ';
|
case ' ': return ' ';
|
||||||
case '‌': return '';
|
case '‌': return '';
|
||||||
@ -1383,7 +1383,10 @@ export default function MailPage() {
|
|||||||
!line.match(/^={2,}/) &&
|
!line.match(/^={2,}/) &&
|
||||||
!line.match(/^This (email|message) has been/i) &&
|
!line.match(/^This (email|message) has been/i) &&
|
||||||
!line.match(/^Disclaimer/i) &&
|
!line.match(/^Disclaimer/i) &&
|
||||||
!line.match(/^[*_-]{3,}/);
|
!line.match(/^[*_-]{3,}/) &&
|
||||||
|
!line.match(/^Envoyé depuis/i) &&
|
||||||
|
!line.match(/^Envoyé à partir de/i) &&
|
||||||
|
!line.match(/^Sent from/i);
|
||||||
})
|
})
|
||||||
.join('\n')
|
.join('\n')
|
||||||
.trim();
|
.trim();
|
||||||
@ -1411,13 +1414,14 @@ export default function MailPage() {
|
|||||||
}
|
}
|
||||||
replyHeader += `\n`;
|
replyHeader += `\n`;
|
||||||
} else {
|
} else {
|
||||||
|
// Same header format for both reply and reply all
|
||||||
replyHeader = `\n\nOn ${formattedDate}, ${selectedEmail.from} wrote:\n`;
|
replyHeader = `\n\nOn ${formattedDate}, ${selectedEmail.from} wrote:\n`;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Indent the original content
|
// Indent the original content with proper spacing
|
||||||
const indentedContent = originalContent
|
const indentedContent = originalContent
|
||||||
.split('\n')
|
.split('\n')
|
||||||
.map(line => `> ${line}`)
|
.map(line => line ? `> ${line}` : '>') // Keep empty lines as '>' for better readability
|
||||||
.join('\n');
|
.join('\n');
|
||||||
|
|
||||||
return `${replyHeader}${indentedContent}`;
|
return `${replyHeader}${indentedContent}`;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user