Initial attempt to make toggleInlineFormat paragraph-aware
This commit is contained in:
parent
adec308529
commit
b2aba6db35
5 changed files with 221 additions and 27 deletions
|
@ -250,7 +250,7 @@ function parseHtmlMessage(html, partCreator, isQuotedMessage) {
|
|||
}
|
||||
|
||||
export function parsePlainTextMessage(body, partCreator, isQuotedMessage) {
|
||||
const lines = body.split("\n");
|
||||
const lines = body.split(/\r\n|\r|\n/g); // split on any new-line combination not just \n
|
||||
const parts = lines.reduce((parts, line, i) => {
|
||||
if (isQuotedMessage) {
|
||||
parts.push(partCreator.plain(QUOTE_LINE_PREFIX));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue