mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Issue 12138 - Fix chat support for regex chars in code blocks
This commit is contained in:
@@ -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;
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user