From 614307a8f511b1f7076958922d7e2f887b7c088c Mon Sep 17 00:00:00 2001
From: Niklas Fasching
@@ -42,9 +42,9 @@ footnotes that reference a non-existant definition are rendered but log a warnin
Please note that the footnotes section is not automatically excluded from the export like in emacs. 8
@@ -38,22 +38,22 @@ not just where they are actually meant to be - even here >
we can link to headlines that define a custom_id: #this-will-be-the-id-of-the-headline
Still outside the drawer
Still outside the drawer
it's possible to use
:PROPERTIES:
not a property
diff --git a/org/testdata/misc.html b/org/testdata/misc.html
index c209ccd..b56dbb1 100644
--- a/org/testdata/misc.html
+++ b/org/testdata/misc.html
@@ -1,3 +1,4 @@
+ neato!
This
@@ -101,17 +102,17 @@ or even a totally custom kind of block
crazy ain't it?
see
Note that only src/example/export block inclusion is supported for now.
There's quite a lot more to include (see the org manual for include files) but I
@@ -207,10 +208,10 @@ deploy:
-
@@ -260,19 +261,19 @@ note that —— is replaced with 2 mdashes and …. becomes ellipsis+. and so o
either
@@ -304,24 +305,24 @@ foo
@@ -336,14 +337,14 @@ sub bullet
italics
and all other headlines accordingly as
`lvl + 1` - we'll go with that.
---
org/html_writer.go | 7 +-
org/testdata/footnotes.html | 8 +-
org/testdata/footnotes_in_headline.html | 4 +-
org/testdata/headlines.html | 24 ++---
org/testdata/misc.html | 125 ++++++++++++------------
org/testdata/misc.org | 1 +
org/testdata/misc.pretty_org | 1 +
org/testdata/options.html | 4 +-
8 files changed, 90 insertions(+), 84 deletions(-)
diff --git a/org/html_writer.go b/org/html_writer.go
index 916618c..d630db5 100644
--- a/org/html_writer.go
+++ b/org/html_writer.go
@@ -88,6 +88,9 @@ func (w *HTMLWriter) WriterWithExtensions() Writer {
func (w *HTMLWriter) Before(d *Document) {
w.document = d
w.log = d.Log
+ if title := d.Get("TITLE"); title != "" {
+ w.WriteString(fmt.Sprintf(`
%s
`+"\n", title))
+ }
w.WriteOutline(d)
}
@@ -214,7 +217,7 @@ func (w *HTMLWriter) WriteHeadline(h Headline) {
}
}
- w.WriteString(fmt.Sprintf(`
+
+
Using some footnotes
-
-
+
+
Footnotes
-
+
+
Title 1
-
+
+
Simple Headline
[1/2]
-
+
TODO
[B]
Headline with todo status & priority
-
-
+
+
DONE
Headline with TODO status
-
+
+
+
[A]
Headline with tags & priority
-
+
+
CUSTOM
headline with custom status
-
#+SETUPFILE
- in this case the setup file contains the following
#+SETUPFILE
- in this cas
+
+
malformed property drawer
-
Misc
-
+
-
issues from goorgeous (free test cases, yay!)
-
+
+
DONE
#19: Support #+HTML
-
+
+
+
DONE
#29: Support verse block
-
+
+
DONE
#30: Support #+SETUPFILE
-
./headlines.org
+
+
DONE
#31: Support #+INCLUDE
-
+
+
DONE
#33: Wrong output when mixing html with Org mode
-
@@ -225,14 +226,14 @@ deploy:
+
-
DONE
#41: Support Table Of Contents
-
+
+
+
DONE
#46: Support for symbols like ndash and mdash
-
-
+
+
DONE
#47: Consecutive
code
wrapped text gets joined
-this
or that
foo.
either this
or that
foo.
+
+
DONE
#50: LineBreaks in lists are preserved
-
-
+
+
DONE
#68: Quote block with inline markup
-
-
+
+
DONE
#72: Support for #+ATTR_HTML
-
-
+
+
DONE
#75: Not parsing nested lists correctly
-
+
-
DONE
#77: Recognize
code
— as code plus dash
-
+
+
+
DONE
#78: Emphasis at beginning of line
-
just a space as title…
-Foo paragraph.
-Bar paragraph
-just like #46
@@ -425,17 +426,17 @@ src/example/export blocks should not be converted! -footnotes can contain markup - and other elements and stuff 1 2
-
The behaviour of Org mode <s TAB
changed and it now inserts lowercased src blocks (go-org already handled this one)
Hello, I'm writing hugo blogs using org-mode.
When inserting an image link like , hugo doesn't export the image.
@@ -492,24 +493,24 @@ When inserting an image link like
+
misc fuzz / regression / edge case
-
-
+
+
index out of range in headline priority parsing
-
-
-[#B
-
+
+[#B
+
+
index out of range in explicit line break parsing
-
+
0\\
-
+
Footnotes
-
+
diff --git a/org/testdata/misc.org b/org/testdata/misc.org
index 78d5dbc..4c67c1d 100644
--- a/org/testdata/misc.org
+++ b/org/testdata/misc.org
@@ -1,3 +1,4 @@
+#+TITLE: Misc
** issues from goorgeous (free test cases, yay!)
*** DONE [[https://github.com/chaseadamsio/goorgeous/issues/19][#19]]: Support #+HTML
#+HTML: neato!
diff --git a/org/testdata/misc.pretty_org b/org/testdata/misc.pretty_org
index ff61450..7c5419a 100644
--- a/org/testdata/misc.pretty_org
+++ b/org/testdata/misc.pretty_org
@@ -1,3 +1,4 @@
+#+TITLE: Misc
** issues from goorgeous (free test cases, yay!)
*** DONE [[https://github.com/chaseadamsio/goorgeous/issues/19][#19]]: Support #+HTML
#+HTML: neato!
diff --git a/org/testdata/options.html b/org/testdata/options.html
index 0902d83..496b2a6 100644
--- a/org/testdata/options.html
+++ b/org/testdata/options.html
@@ -1,8 +1,8 @@
-
+
DONE
[A]
#+OPTIONS:
toggles supported by go-org
-
+
go-org
supports multiple export toggles as described in the export settings section of the Org mode manual.
By default (most of?) those toggles are enabled. This file starts with #+OPTIONS: toc:nil f:nil e:nil
and thus