Much improved

This commit is contained in:
Bryan Ashby 2020-12-31 01:20:46 -07:00
parent d568cb993d
commit 6abd166d22
No known key found for this signature in database
GPG Key ID: B49EB437951D2542
1 changed files with 5 additions and 11 deletions

View File

@ -23,7 +23,7 @@ const {
} = require('./string_util.js');
const {
stripMciColorCodes,
pipeToAnsi,
controlCodesToAnsi,
} = require('./color_codes.js');
const Config = require('./config.js').get;
const { getAddressedToInfo } = require('./mail_util.js');
@ -459,9 +459,7 @@ exports.FullScreenEditorModule = exports.getModule = class FullScreenEditorModul
const QuoteRegex = /^ ([A-Za-z0-9]{1,2})>([ ]+)([^\r\n]*\r?\n)/gm;
msg = msg.replace(QuoteRegex, (m, initials, spc, text) => {
return pipeToAnsi(
` ${styleL1[0]}${initials}${styleL1[1]}>${spc}${styleL1[2]}${text}${bodyMessageView.styleSGR1}`
);
return ` ${styleL1[0]}${initials}${styleL1[1]}>${spc}${styleL1[2]}${text}${bodyMessageView.styleSGR1}`;
});
}
@ -471,9 +469,7 @@ exports.FullScreenEditorModule = exports.getModule = class FullScreenEditorModul
const TearLineRegex = /^--- (.+)$(?![\s\S]*^--- .+$)/m;
msg = msg.replace(TearLineRegex, (m, text) => {
return pipeToAnsi(
`${style[0]}--- ${style[1]}${text}${bodyMessageView.styleSGR1}`
);
return `${style[0]}--- ${style[1]}${text}${bodyMessageView.styleSGR1}`;
});
}
@ -482,13 +478,11 @@ exports.FullScreenEditorModule = exports.getModule = class FullScreenEditorModul
const OriginRegex = /^([ ]{1,2})\* Origin: (.+)$/m;
msg = msg.replace(OriginRegex, (m, spc, text) => {
return pipeToAnsi(
`${spc}${style[0]}* ${style[1]}Origin: ${style[2]}${text}${bodyMessageView.styleSGR1}`
);
return `${spc}${style[0]}* ${style[1]}Origin: ${style[2]}${text}${bodyMessageView.styleSGR1}`;
});
}
bodyMessageView.setText(msg);
bodyMessageView.setText(controlCodesToAnsi(msg));
}
}
}