Michael Howell
10 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
17 additions and
1 deletions
-
test/pathological.json
-
test/pathological.mjs
|
|
@ -1 +1 @@ |
|
|
|
{ "md5": "68c7c28fe0d4a34367f27dcbceec9fed" } |
|
|
|
{ "md5": "80e12450752e4667b3656fa2cd12e9d5" } |
|
|
|
|
|
@ -114,6 +114,10 @@ describe('Pathological sequences speed', () => { |
|
|
|
await test_pattern(Array(1000).fill(0).map(function (_, x) { return ' '.repeat(x) + '* a\n' }).join('')) |
|
|
|
}) |
|
|
|
|
|
|
|
it('U+0000 in input', async () => { |
|
|
|
await test_pattern('abc\u0000de\u0000'.repeat(100000)) |
|
|
|
}) |
|
|
|
|
|
|
|
it('backticks', async () => { |
|
|
|
await test_pattern(Array(3000).fill(0).map(function (_, x) { return 'e' + '`'.repeat(x) }).join('')) |
|
|
|
}) |
|
|
@ -129,6 +133,18 @@ describe('Pathological sequences speed', () => { |
|
|
|
it('unclosed <!--', async () => { |
|
|
|
await test_pattern('</' + '<!--'.repeat(100000)) |
|
|
|
}) |
|
|
|
|
|
|
|
it('empty lines in deeply nested lists', async () => { |
|
|
|
await test_pattern('- '.repeat(30000) + 'x' + '\n'.repeat(30000)) |
|
|
|
}) |
|
|
|
|
|
|
|
it('empty lines in deeply nested lists in blockquote', async () => { |
|
|
|
await test_pattern('> ' + '- '.repeat(30000) + 'x\n' + '>\n'.repeat(30000)) |
|
|
|
}) |
|
|
|
|
|
|
|
it('emph in deep blockquote', async () => { |
|
|
|
await test_pattern('>'.repeat(100000) + 'a*'.repeat(100000)) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
describe('Markdown-it', () => { |
|
|
|