diff --git a/org/html.go b/org/html.go index d42d94f..6f60db0 100644 --- a/org/html.go +++ b/org/html.go @@ -173,9 +173,20 @@ func (w *HTMLWriter) writeFootnotes(d *Document) { } func (w *HTMLWriter) writeHeadline(h Headline) { - w.WriteString(fmt.Sprintf("", h.Lvl)) + w.WriteString(fmt.Sprintf("\n", h.Lvl)) + if h.Status != "" { + w.WriteString(fmt.Sprintf(`%s`, h.Status) + "\n") + } w.writeNodes(h.Title...) - w.WriteString(fmt.Sprintf("\n", h.Lvl)) + if len(h.Tags) != 0 { + tags := make([]string, len(h.Tags)) + for i, tag := range h.Tags { + tags[i] = fmt.Sprintf(`%s`, tag) + } + w.WriteString("   ") + w.WriteString(fmt.Sprintf(`%s`, strings.Join(tags, " "))) + } + w.WriteString(fmt.Sprintf("\n\n", h.Lvl)) w.writeNodes(h.Children...) } diff --git a/org/testdata/footnotes.html b/org/testdata/footnotes.html index 78f9668..6dac97b 100644 --- a/org/testdata/footnotes.html +++ b/org/testdata/footnotes.html @@ -1,4 +1,6 @@ -

Using some footnotes

+

+Using some footnotes +

-

#33: Wrong output when mixing html with org-mode

+

+DONE +#33: Wrong output when mixing html with org-mode +

@@ -99,7 +113,10 @@ deploy:
-

#46: Support for symbols like ndash and mdash

+

+DONE +#46: Support for symbols like ndash and mdash +

-

#47: Consecutive code wrapped text gets joined

+

+DONE +#47: Consecutive code wrapped text gets joined +

either this or that foo. either this or that foo.

-

#50: LineBreaks in lists are preserved

+

+DONE +#50: LineBreaks in lists are preserved +

-

#77: Recognize code— as code plus dash

-

#78: Emphasis at beginning of line

+

+DONE +#77: Recognize code— as code plus dash +

+

+DONE +#78: Emphasis at beginning of line +

italics

@@ -197,17 +235,29 @@ sub bullet Text italics

-

#82: Crash on empty headline

-

+

+DONE +#82: Crash on empty headline +

+

+ +

just a space as title…

-

#84: Paragraphs that are not followed by an empty line are not parsed correctly

-

Foo

+

+DONE +#84: Paragraphs that are not followed by an empty line are not parsed correctly +

+

+Foo +

Foo paragraph.

-

Bar

+

+Bar +

Bar paragraph