diff --git a/org/html_writer.go b/org/html_writer.go index 31efe18..373b8bb 100644 --- a/org/html_writer.go +++ b/org/html_writer.go @@ -93,6 +93,10 @@ func (w *HTMLWriter) Before(d *Document) { w.document = d w.log = d.Log if title := d.Get("TITLE"); title != "" { + titleDocument := d.Parse(strings.NewReader(title), d.Path) + if titleDocument.Error == nil { + title = w.WriteNodesAsString(titleDocument.Nodes...) + } w.WriteString(fmt.Sprintf(`

%s

`+"\n", title)) } w.WriteOutline(d) @@ -140,7 +144,7 @@ func (w *HTMLWriter) WriteInlineBlock(b InlineBlock) { w.WriteString(fmt.Sprintf("
\n%s\n
", lang, content)) case "export": if strings.ToLower(b.Parameters[0]) == "html" { - w.WriteString(content + "\n") + w.WriteString(content) } } } diff --git a/org/testdata/inline.html b/org/testdata/inline.html index 2bcdf92..3e6f5c0 100644 --- a/org/testdata/inline.html +++ b/org/testdata/inline.html @@ -51,7 +51,6 @@ inline source blocks like
  • inline export blocks

    hello

    -

  • diff --git a/org/testdata/misc.html b/org/testdata/misc.html index 3e76471..1a1b096 100644 --- a/org/testdata/misc.html +++ b/org/testdata/misc.html @@ -1,4 +1,7 @@ -

    Misc

    +

    +Misc title with an inline html export +

    +