1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-08-07 21:23:00 +03:00

Merge pull request #4008 from BobVul/fix-markdown-escapes

Fix escaped markdown passing backslashes through
This commit is contained in:
Bruno Windels
2020-02-14 09:18:53 +00:00
committed by GitHub
2 changed files with 14 additions and 0 deletions

View File

@@ -43,4 +43,10 @@ describe('editor/serialize', function() {
const html = htmlSerializeIfNeeded(model, {});
expect(html).toBe("<em>hello</em> world");
});
it('escaped markdown should not retain backslashes', function() {
const pc = createPartCreator();
const model = new EditorModel([pc.plain('\\*hello\\* world')]);
const html = htmlSerializeIfNeeded(model, {});
expect(html).toBe('*hello* world');
});
});