From c0856327b39b00b39b5d7e1f5ed0eed8bb1b6a23 Mon Sep 17 00:00:00 2001 From: yuin Date: Sat, 9 Jul 2022 16:22:17 +0900 Subject: [PATCH] Fix #313 --- _test/extra.txt | 12 ++++++++++++ parser/list.go | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/_test/extra.txt b/_test/extra.txt index 0998118..c5b2ac9 100644 --- a/_test/extra.txt +++ b/_test/extra.txt @@ -716,3 +716,15 @@ a //= = = = = = = = = = = = = = = = = = = = = = = =// +56: An empty list followed by blockquote +//- - - - - - - - -// +1. +> This is a quote. +//- - - - - - - - -// +
    +
  1. +
+
+

This is a quote.

+
+//= = = = = = = = = = = = = = = = = = = = = = = =// diff --git a/parser/list.go b/parser/list.go index 2a1c03a..e5cad11 100644 --- a/parser/list.go +++ b/parser/list.go @@ -226,6 +226,10 @@ func (b *listParser) Continue(node ast.Node, reader text.Reader, pc Context) Sta } } + if lastIsEmpty && indent < offset { + return Close + } + // Non empty items can not exist next to an empty list item // with blank lines. So we need to close the current list //