Fix outline nesting

oops - that got lost during the rebase - here we go
This commit is contained in:
Niklas Fasching 2018-12-26 17:42:59 +01:00
parent 141d6a27a9
commit 940b1c7125
2 changed files with 15 additions and 5 deletions

View file

@ -255,8 +255,10 @@ func (d *Document) addFootnote(name string, definition *FootnoteDefinition) {
}
func (d *Document) addHeadline(headline *Headline) int {
d.Outline.last.add(&Section{Headline: headline})
current := &Section{Headline: headline}
d.Outline.last.add(current)
d.Outline.count++
d.Outline.last = current
return d.Outline.count
}