Merge pull request #4694 from justin-sleep/remove-escape-backslashes

Remove escape backslashes in non-Markdown messages
This commit is contained in:
Travis Ralston 2020-06-17 11:06:04 -06:00 committed by GitHub
commit 803b7bb30f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 8 deletions

View file

@ -42,6 +42,10 @@ export function htmlSerializeIfNeeded(model: EditorModel, {forceHTML = false} =
if (!parser.isPlainText() || forceHTML) {
return parser.toHTML();
}
// ensure removal of escape backslashes in non-Markdown messages
if (md.indexOf("\\") > -1) {
return parser.toPlaintext();
}
}
export function textSerialize(model: EditorModel) {