Skip to content

Commit

Permalink
Sync pathological tests with cmark
Browse files Browse the repository at this point in the history
  • Loading branch information
rlidwka committed Sep 26, 2023
1 parent 2b6cac2 commit 49ca65b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions test/pathological.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ describe('Pathological sequences speed', () => {
await test_pattern('[ (]('.repeat(40000));
});

it('pattern ![[]() repeated', async () => {
await test_pattern('![[]()'.repeat(20000));
});

it('nested brackets', async () => {
await test_pattern('['.repeat(20000) + 'a' + ']'.repeat(20000));
});
Expand All @@ -124,6 +128,10 @@ describe('Pathological sequences speed', () => {
it('unclosed links B', async () => {
await test_pattern('[a](b'.repeat(30000));
});

it('unclosed <!--', async () => {
await test_pattern('</' + '<!--'.repeat(100000));
});
});

describe('Markdown-it', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/pathological.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "md5": "da7a30ea2886aea813e50c2764ecc40f" }
{ "md5": "68c7c28fe0d4a34367f27dcbceec9fed" }

0 comments on commit 49ca65b

Please sign in to comment.