From e77ca9231aa4459a7948db9ded09fa760997b91e Mon Sep 17 00:00:00 2001 From: yuin Date: Sun, 17 Oct 2021 17:46:05 +0900 Subject: [PATCH] #248 - 8 --- _test/extra.txt | 8 ++++++++ parser/list.go | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/_test/extra.txt b/_test/extra.txt index 7e849f1..f4baf84 100644 --- a/_test/extra.txt +++ b/_test/extra.txt @@ -562,3 +562,11 @@ x //- - - - - - - - -//

[  b ](y)

//= = = = = = = = = = = = = = = = = = = = = = = =// + +44: An empty list item(with trailing spaces) cannot interrupt a paragraph +//- - - - - - - - -// +a\n* \n +//- - - - - - - - -// +

a +*

+//= = = = = = = = = = = = = = = = = = = = = = = =// diff --git a/parser/list.go b/parser/list.go index 4142c22..5be0747 100644 --- a/parser/list.go +++ b/parser/list.go @@ -144,7 +144,7 @@ func (b *listParser) Open(parent ast.Node, reader text.Reader, pc Context) (ast. return nil, NoChildren } //an empty list item cannot interrupt a paragraph: - if match[5]-match[4] <= 1 { + if match[4] < 0 || util.IsBlank(line[match[4]:match[5]]) { return nil, NoChildren } }