From 3709d1dc9c79763c96576e6e682c711f733226fe Mon Sep 17 00:00:00 2001 From: Niklas Fasching Date: Wed, 19 Dec 2018 18:19:25 +0100 Subject: [PATCH] Revert "html: Export "#+HUGO: more" as " This reverts commit 16a978fe48a6fa959495d0c09ed4d5d327691fde. not needed after all - turns out hugo looks for the divider before rendering so we can't do anything in go-org --- org/html.go | 8 +++----- org/testdata/keywords.html | 4 ---- org/testdata/keywords.org | 4 ---- org/testdata/keywords.pretty_org | 4 ---- 4 files changed, 3 insertions(+), 17 deletions(-) diff --git a/org/html.go b/org/html.go index 1d64823..3c8edd9 100644 --- a/org/html.go +++ b/org/html.go @@ -169,11 +169,9 @@ func (w *HTMLWriter) writeDrawer(d Drawer) { w.writeNodes(d.Children...) } -func (w *HTMLWriter) writeKeyword(kw Keyword) { - if k, v := kw.Key, kw.Value; k == "HTML" { - w.WriteString(v + "\n") - } else if k == "HUGO" && v == "more" { - w.WriteString("\n") +func (w *HTMLWriter) writeKeyword(k Keyword) { + if k.Key == "HTML" { + w.WriteString(k.Value + "\n") } } diff --git a/org/testdata/keywords.html b/org/testdata/keywords.html index 88d7ebc..135c47e 100644 --- a/org/testdata/keywords.html +++ b/org/testdata/keywords.html @@ -16,7 +16,3 @@ and an image with custom html attributes and a caption kittens! -

-This will be exported as <!–more–> just for hugo -

- diff --git a/org/testdata/keywords.org b/org/testdata/keywords.org index bfd594c..e6b8ce9 100644 --- a/org/testdata/keywords.org +++ b/org/testdata/keywords.org @@ -12,7 +12,3 @@ and an image with custom html attributes and a caption #+ATTR_HTML: :style height: 100%; :id overwritten #+ATTR_HTML: :style border: 10px solid black; :id kittens [[https://placekitten.com/200/200#.png]] - - -This will be exported as just for hugo -#+HUGO: more diff --git a/org/testdata/keywords.pretty_org b/org/testdata/keywords.pretty_org index bfd594c..e6b8ce9 100644 --- a/org/testdata/keywords.pretty_org +++ b/org/testdata/keywords.pretty_org @@ -12,7 +12,3 @@ and an image with custom html attributes and a caption #+ATTR_HTML: :style height: 100%; :id overwritten #+ATTR_HTML: :style border: 10px solid black; :id kittens [[https://placekitten.com/200/200#.png]] - - -This will be exported as just for hugo -#+HUGO: more