Skip to content

Commit

Permalink
#248 - 12
Browse files Browse the repository at this point in the history
  • Loading branch information
yuin committed Oct 20, 2021
1 parent 4b793a1 commit 15ea976
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
15 changes: 14 additions & 1 deletion _test/extra.txt
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,6 @@ a
<p>\v</p>
//= = = = = = = = = = = = = = = = = = = = = = = =//


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

48: Multiple paragraphs in tight list
//- - - - - - - - -//
- a
>
b
//- - - - - - - - -//
<ul>
<li>a
<blockquote>
</blockquote>
b</li>
</ul>
//= = = = = = = = = = = = = = = = = = = = = = = =//
3 changes: 2 additions & 1 deletion parser/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 15ea976

Please sign in to comment.