Convert editor to TypeScript

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2020-07-15 09:45:45 +01:00
parent 87069a9856
commit 8812f98b35
17 changed files with 721 additions and 600 deletions
+1 -1
View File
@@ -257,7 +257,7 @@ function parseHtmlMessage(html: string, partCreator: PartCreator, isQuotedMessag
return parts;
}
export function parsePlainTextMessage(body: string, partCreator: PartCreator, isQuotedMessage: boolean) {
export function parsePlainTextMessage(body: string, partCreator: PartCreator, isQuotedMessage?: boolean) {
const lines = body.split(/\r\n|\r|\n/g); // split on any new-line combination not just \n, collapses \r\n
return lines.reduce((parts, line, i) => {
if (isQuotedMessage) {