From 15ea97611dc4c05afcc292329a208d08c80c524a Mon Sep 17 00:00:00 2001 From: yuin Date: Wed, 20 Oct 2021 18:07:23 +0900 Subject: [PATCH] #248 - 12 --- _test/extra.txt | 15 ++++++++++++++- parser/list.go | 3 ++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/_test/extra.txt b/_test/extra.txt index 82c7267..c6e84c7 100644 --- a/_test/extra.txt +++ b/_test/extra.txt @@ -592,7 +592,6 @@ a

\v

//= = = = = = = = = = = = = = = = = = = = = = = =// - 47: Escape back slashes should not be treated as hard line breaks //- - - - - - - - -// \\\\ @@ -601,3 +600,17 @@ a

\ a

//= = = = = = = = = = = = = = = = = = = = = = = =// + +48: Multiple paragraphs in tight list +//- - - - - - - - -// +- a + > + b +//- - - - - - - - -// + +//= = = = = = = = = = = = = = = = = = = = = = = =// diff --git a/parser/list.go b/parser/list.go index d6ebbfc..a6edc25 100644 --- a/parser/list.go +++ b/parser/list.go @@ -240,8 +240,9 @@ func (b *listParser) Close(node ast.Node, reader text.Reader, pc Context) { if list.IsTight { for child := node.FirstChild(); child != nil; child = child.NextSibling() { - for gc := child.FirstChild(); gc != nil; gc = gc.NextSibling() { + for gc := child.FirstChild(); gc != nil; { paragraph, ok := gc.(*ast.Paragraph) + gc = gc.NextSibling() if ok { textBlock := ast.NewTextBlock() textBlock.SetLines(paragraph.Lines())