Fix bugs in footnotes

This commit is contained in:
yuin 2019-07-24 20:55:37 +09:00
parent 19b18e85fc
commit 21b4a046d0
2 changed files with 2 additions and 1 deletions

View file

@ -15,7 +15,7 @@ That's some text with a footnote.[^1]
<p>That's the second paragraph.</p> <p>That's the second paragraph.</p>
</li> </li>
</ol> </ol>
<section> </section>
//= = = = = = = = = = = = = = = = = = = = = = = =// //= = = = = = = = = = = = = = = = = = = = = = = =//

View file

@ -84,6 +84,7 @@ func (b *footnoteBlockParser) Close(node gast.Node, reader text.Reader, pc parse
} else { } else {
list = ast.NewFootnoteList() list = ast.NewFootnoteList()
pc.Set(footnoteListKey, list) pc.Set(footnoteListKey, list)
node.Parent().InsertBefore(node.Parent(), node, list)
} }
node.Parent().RemoveChild(node.Parent(), node) node.Parent().RemoveChild(node.Parent(), node)
n := node.(*ast.Footnote) n := node.(*ast.Footnote)