From c759df1efecd694e01931e8b8cad03ca5e4211da Mon Sep 17 00:00:00 2001 From: Niklas Fasching Date: Mon, 3 Dec 2018 01:24:17 +0100 Subject: [PATCH] HTMLWriter: Fix example block newline --- org/html.go | 4 ++-- org/testdata/example.html | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/org/html.go b/org/html.go index 70f4f40..f2d89ed 100644 --- a/org/html.go +++ b/org/html.go @@ -114,7 +114,7 @@ func (w *HTMLWriter) writeBlock(b Block) { } w.WriteString(w.HighlightCodeBlock(strings.Join(lines, "\n"), lang) + "\n") case "EXAMPLE": - w.WriteString(`
\n`)
+		w.WriteString(`
` + "\n")
 		w.writeNodes(b.Children...)
 		w.WriteString("
\n") case "QUOTE": @@ -191,7 +191,7 @@ func (w *HTMLWriter) writeRegularLink(l RegularLink) { descriptionWriter.writeNodes(l.Description...) description := descriptionWriter.String() switch l.Protocol { - case "file": // TODO + case "file": url = url[len("file:"):] if strings.Contains(".png.jpg.jpeg.gif", path.Ext(l.URL)) { w.WriteString(fmt.Sprintf(`%s`, url, description, description)) diff --git a/org/testdata/example.html b/org/testdata/example.html index 59aa612..26a4df6 100644 --- a/org/testdata/example.html +++ b/org/testdata/example.html @@ -168,7 +168,8 @@ auto link, i.e. not inside \[[square brackets]\] <
a source block without a language
 and a second line
 and a third one
-
\nan example block
+
+an example block
 with multiple lines