diff --git a/src/Tokenizer.ts b/src/Tokenizer.ts index 39ea1149..7f7b2c24 100644 --- a/src/Tokenizer.ts +++ b/src/Tokenizer.ts @@ -338,6 +338,12 @@ export class _Tokenizer { text = `${text}\n${consumed}`; } lines = lines.slice(consumedCount); + + // A lazy line the list did not take is not a paragraph continuation, + // e.g. after an empty list item, so it ends the blockquote. + if (lines.length > 0 && !this.rules.other.blockquoteStart.test(lines[0])) { + break; + } continue; } } diff --git a/test/specs/new/blockquote_empty_list_item_lazy_line.html b/test/specs/new/blockquote_empty_list_item_lazy_line.html new file mode 100644 index 00000000..7289c4d7 --- /dev/null +++ b/test/specs/new/blockquote_empty_list_item_lazy_line.html @@ -0,0 +1,29 @@ +
+ +
+

foo

+
+
    +
  1. +
+
+

bar

+
+
+
    +
  • +
+
+
+

baz

+
+ +
+

qux

+
+

quux

+
diff --git a/test/specs/new/blockquote_empty_list_item_lazy_line.md b/test/specs/new/blockquote_empty_list_item_lazy_line.md new file mode 100644 index 00000000..9ca22735 --- /dev/null +++ b/test/specs/new/blockquote_empty_list_item_lazy_line.md @@ -0,0 +1,12 @@ +> - +foo + +> 1. +bar + +> > * +baz + +> - +qux +> quux