From 940b1c71257aa0711be9fed179a8040dc6ab9a49 Mon Sep 17 00:00:00 2001 From: Niklas Fasching Date: Wed, 26 Dec 2018 17:42:59 +0100 Subject: [PATCH] Fix outline nesting oops - that got lost during the rebase - here we go --- org/document.go | 4 +++- org/testdata/misc.html | 16 ++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/org/document.go b/org/document.go index 4b240b4..34fad76 100644 --- a/org/document.go +++ b/org/document.go @@ -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 } diff --git a/org/testdata/misc.html b/org/testdata/misc.html index a6f9657..2c7de73 100644 --- a/org/testdata/misc.html +++ b/org/testdata/misc.html @@ -2,7 +2,7 @@