diff --git a/org/html.go b/org/html.go index 30aa1c1..66e5deb 100644 --- a/org/html.go +++ b/org/html.go @@ -34,7 +34,7 @@ var listTags = map[string][]string{ func NewHTMLWriter() *HTMLWriter { return &HTMLWriter{ HighlightCodeBlock: func(source, lang string) string { - return fmt.Sprintf(`
%s
%s
%s
`, "\n", html.EscapeString(source), "\n") + return fmt.Sprintf("%s\n
\n%s\n
\n", `
`, html.EscapeString(source)) }, } } diff --git a/org/testdata/blocks.html b/org/testdata/blocks.html index b133760..3e2e69d 100644 --- a/org/testdata/blocks.html +++ b/org/testdata/blocks.html @@ -1,19 +1,23 @@
-
echo "a bash source block"
+
+echo "a bash source block"
 
 function hello {
     echo Hello World!
 }
 
-hello
+hello +

block caption

-
a source block without a language
+
+a source block without a language
+
 an example block with
diff --git a/org/testdata/captions.html b/org/testdata/captions.html
index b42b6bc..138f066 100644
--- a/org/testdata/captions.html
+++ b/org/testdata/captions.html
@@ -3,7 +3,9 @@ Anything can be captioned. Also captions are not real, correct captions but just
 

-
echo "i have a caption!"
+
+echo "i have a caption!"
+

captioned soure block diff --git a/org/testdata/footnotes.html b/org/testdata/footnotes.html index 8d22415..c1eac09 100644 --- a/org/testdata/footnotes.html +++ b/org/testdata/footnotes.html @@ -41,7 +41,9 @@ and other elements like blocks

-
other non-plain
+
+other non-plain
+
  • diff --git a/org/testdata/lists.html b/org/testdata/lists.html index 7e3a968..c50f03f 100644 --- a/org/testdata/lists.html +++ b/org/testdata/lists.html @@ -49,7 +49,9 @@ and some lines of text and another subitem

    -
    echo with a block
    +
    +echo with a block
    +