Skip to content

Commit 82ace24

Browse files
authored
Merge pull request #1391 from mccraveiro/ordered-list
Limit ordered list marker length
2 parents 5378f57 + 95f687d commit 82ace24

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/marked.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ block.def = edit(block.def)
4444
.replace('title', block._title)
4545
.getRegex();
4646

47-
block.bullet = /(?:[*+-]|\d+\.)/;
47+
block.bullet = /(?:[*+-]|\d{1,9}\.)/;
4848
block.item = /^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;
4949
block.item = edit(block.item, 'gm')
5050
.replace(/bull/g, block.bullet)

test/specs/commonmark/commonmark-spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ describe('CommonMark 0.28 List items', function() {
248248
var section = 'List items';
249249

250250
// var shouldPassButFails = [];
251-
var shouldPassButFails = [229, 237, 236, 227, 218, 243, 259, 241, 239, 247, 246, 225, 220, 258, 260, 244];
251+
var shouldPassButFails = [237, 236, 227, 218, 243, 259, 241, 239, 247, 246, 225, 220, 258, 260, 244];
252252

253253
var willNotBeAttemptedByCoreTeam = [];
254254

0 commit comments

Comments
 (0)