diff --git a/org/html_writer.go b/org/html_writer.go index 731f7db..8a35e17 100644 --- a/org/html_writer.go +++ b/org/html_writer.go @@ -124,8 +124,10 @@ func (w *HTMLWriter) WriteBlock(b Block) { w.WriteString(fmt.Sprintf("
` + "\n" + html.EscapeString(content) + "\n\n") - case name == "EXPORT" && len(b.Parameters) >= 1 && strings.ToLower(b.Parameters[0]) == "html": - w.WriteString(content + "\n") + case name == "EXPORT": + if len(b.Parameters) >= 1 && strings.ToLower(b.Parameters[0]) == "html" { + w.WriteString(content + "\n") + } case name == "QUOTE": w.WriteString("
\n" + content + "\n") case name == "CENTER": diff --git a/org/testdata/blocks.org b/org/testdata/blocks.org index 3990008..b789401 100644 --- a/org/testdata/blocks.org +++ b/org/testdata/blocks.org @@ -57,6 +57,11 @@ console.log("Hello World!") #+END_EXPORT +#+BEGIN_EXPORT something-other-than-html +I won't be rendered as html +#+END_EXPORT + + - list item 1 blocks can contain unindented lines that would normally end a list item #+BEGIN_EXAMPLE diff --git a/org/testdata/blocks.pretty_org b/org/testdata/blocks.pretty_org index 355ed29..40cbec8 100644 --- a/org/testdata/blocks.pretty_org +++ b/org/testdata/blocks.pretty_org @@ -57,6 +57,11 @@ console.log("Hello World!") #+END_EXPORT +#+BEGIN_EXPORT something-other-than-html +I won't be rendered as html +#+END_EXPORT + + - list item 1 blocks can contain unindented lines that would normally end a list item #+BEGIN_EXAMPLE