From d6b7424da52938f8693d1404502ae056153fcd63 Mon Sep 17 00:00:00 2001
From: Niklas Fasching
Date: Tue, 18 Dec 2018 14:21:46 +0100
Subject: [PATCH] html: Fix headline priority export
when #+OPTIONS: pri:t is set (org-export-with-priority) Org mode exports the
priority as {[A], [B], [C]}, not {A, B, C} - we should do the same
---
org/html.go | 2 +-
org/testdata/headlines.html | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/org/html.go b/org/html.go
index 176b968..74f277a 100644
--- a/org/html.go
+++ b/org/html.go
@@ -206,7 +206,7 @@ func (w *HTMLWriter) writeHeadline(h Headline) {
w.WriteString(fmt.Sprintf(`%s`, h.Status) + "\n")
}
if h.Priority != "" {
- w.WriteString(fmt.Sprintf(`%s`, h.Priority) + "\n")
+ w.WriteString(fmt.Sprintf(`[%s]`, h.Priority) + "\n")
}
w.WriteString(title)
diff --git a/org/testdata/headlines.html b/org/testdata/headlines.html
index 389a341..171c223 100644
--- a/org/testdata/headlines.html
+++ b/org/testdata/headlines.html
@@ -22,7 +22,7 @@ not just where they are actually meant to be - even here > TODO
-B
+[B]
Headline with todo status & priority
@@ -33,7 +33,7 @@ Headline with TODO status
the content
-A
+[A]
Headline with tags & priority foo bar