Fix inline footnote definition parsing
footnote definition descriptions are always elements - not just raw inline markup. we'll just wrap the description in a paragraph
This commit is contained in:
parent
d5bf4317b2
commit
0df8bc541b
2 changed files with 4 additions and 2 deletions
|
@ -116,7 +116,8 @@ func (d *Document) parseFootnoteReference(input string, start int) (int, Node) {
|
|||
name, definition := m[1], m[3]
|
||||
link := FootnoteLink{name, nil}
|
||||
if definition != "" {
|
||||
link.Definition = &FootnoteDefinition{name, d.parseInline(definition), true}
|
||||
paragraph := Paragraph{[]Node{Line{d.parseInline(definition)}}}
|
||||
link.Definition = &FootnoteDefinition{name, []Node{paragraph}, true}
|
||||
}
|
||||
d.Footnotes.add(name, link.Definition)
|
||||
return len(m[0]), link
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue