Issue 12138 - Fix chat support for regex chars in code blocks

This commit is contained in:
Bart Enkelaar
2020-04-27 13:56:27 +02:00
parent 6b2e9f16e2
commit 66ed0a350b
2 changed files with 19 additions and 3 deletions

View File

@@ -119,4 +119,18 @@ describe('highlightMentions', () => {
expect(err).to.be.undefined;
});
it('github issue 12138, method crashes when regex chars are used in code block', async () => {
const text = '`[test]`';
let err;
try {
await highlightMentions(text);
} catch (e) {
err = e;
}
expect(err).to.be.undefined;
});
});