Add lossless inline-definition-footnote rendering for the OrgWriter
This commit is contained in:
parent
fc982125c9
commit
a570fc736f
6 changed files with 49 additions and 29 deletions
|
@ -14,6 +14,7 @@ type Footnotes struct {
|
|||
type FootnoteDefinition struct {
|
||||
Name string
|
||||
Children []Node
|
||||
Inline bool
|
||||
}
|
||||
|
||||
var footnoteDefinitionRegexp = regexp.MustCompile(`^\[fn:([\w-]+)\]\s+(.+)`)
|
||||
|
@ -33,6 +34,6 @@ func (d *Document) parseFootnoteDefinition(i int, parentStop stopFn) (int, Node)
|
|||
d.tokens[i].kind == "headline" || d.tokens[i].kind == "footnoteDefinition"
|
||||
}
|
||||
consumed, nodes := d.parseMany(i, stop)
|
||||
d.Footnotes.Definitions[name] = FootnoteDefinition{name, nodes}
|
||||
d.Footnotes.Definitions[name] = FootnoteDefinition{name, nodes, false}
|
||||
return consumed, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue