Skip to content

Commit f0dc8a2

Browse files
author
MarkedJS bot
committedFeb 3, 2021
🗜️ build [skip ci]
1 parent 1e36afd commit f0dc8a2

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed
 

‎lib/marked.esm.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -553,8 +553,11 @@ var Tokenizer_1 = class Tokenizer {
553553
// Backpedal if it does not belong in this list.
554554
if (i !== l - 1) {
555555
bnext = this.rules.block.listItemStart.exec(itemMatch[i + 1]);
556-
557-
if (bnext[1].length > bcurr[0].length || bnext[1].length > 3) {
556+
if (
557+
!this.options.pedantic
558+
? bnext[1].length > bcurr[0].length || bnext[1].length > 3
559+
: bnext[1].length > bcurr[1].length
560+
) {
558561
// nested list
559562
itemMatch.splice(i, 2, itemMatch[i] + '\n' + itemMatch[i + 1]);
560563
i--;

‎lib/marked.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@
652652
if (i !== l - 1) {
653653
bnext = this.rules.block.listItemStart.exec(itemMatch[i + 1]);
654654

655-
if (bnext[1].length > bcurr[0].length || bnext[1].length > 3) {
655+
if (!this.options.pedantic ? bnext[1].length > bcurr[0].length || bnext[1].length > 3 : bnext[1].length > bcurr[1].length) {
656656
// nested list
657657
itemMatch.splice(i, 2, itemMatch[i] + '\n' + itemMatch[i + 1]);
658658
i--;

‎marked.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.