Skip to content

Commit

Permalink
🗜️ build [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkedJS bot committed Feb 3, 2021
1 parent 1e36afd commit f0dc8a2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions lib/marked.esm.js
Expand Up @@ -553,8 +553,11 @@ var Tokenizer_1 = class Tokenizer {
// Backpedal if it does not belong in this list.
if (i !== l - 1) {
bnext = this.rules.block.listItemStart.exec(itemMatch[i + 1]);

if (bnext[1].length > bcurr[0].length || bnext[1].length > 3) {
if (
!this.options.pedantic
? bnext[1].length > bcurr[0].length || bnext[1].length > 3
: bnext[1].length > bcurr[1].length
) {
// nested list
itemMatch.splice(i, 2, itemMatch[i] + '\n' + itemMatch[i + 1]);
i--;
Expand Down
2 changes: 1 addition & 1 deletion lib/marked.js
Expand Up @@ -652,7 +652,7 @@
if (i !== l - 1) {
bnext = this.rules.block.listItemStart.exec(itemMatch[i + 1]);

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

0 comments on commit f0dc8a2

Please sign in to comment.