aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/org.md5
-rw-r--r--src/Text/Pandoc/Readers/Org/Meta.hs1
-rw-r--r--test/Tests/Readers/Org/Meta.hs7
3 files changed, 12 insertions, 1 deletions
diff --git a/doc/org.md b/doc/org.md
index b65782107..d117d09dc 100644
--- a/doc/org.md
+++ b/doc/org.md
@@ -51,7 +51,7 @@ occur.
Pandoc follows the LaTeX exporter in that it allows markup in
the description. In contrast, the Org-mode HTML exporter treats
- reads the description as plain text.
+ the description as plain text.
- LATEX_HEADER: arbitrary lines to add to the document's preamble.
Contrary to Org-mode, these lines are not inserted before the
@@ -74,6 +74,9 @@ occur.
- SUBTITLE: the document's subtitle; fully supported.
+ The content of this option is stored as inlines in the
+ `subtitle` metadata field.
+
- HTML_HEAD: arbitrary lines to add to the HTML document's head;
fully supported.
diff --git a/src/Text/Pandoc/Readers/Org/Meta.hs b/src/Text/Pandoc/Readers/Org/Meta.hs
index 3e77b3f42..c922403df 100644
--- a/src/Text/Pandoc/Readers/Org/Meta.hs
+++ b/src/Text/Pandoc/Readers/Org/Meta.hs
@@ -79,6 +79,7 @@ exportSettingHandlers = Map.fromList
, ("date" , lineOfInlines `parseThen` setField "date")
, ("description", lineOfInlines `parseThen` collectLines "description")
, ("keywords" , lineOfInlines `parseThen` collectLines "keywords")
+ , ("subtitle" , lineOfInlines `parseThen` collectLines "subtitle")
, ("title" , lineOfInlines `parseThen` collectLines "title")
-- LaTeX
, ("latex_class", fmap pure anyLine `parseThen` setField "documentclass")
diff --git a/test/Tests/Readers/Org/Meta.hs b/test/Tests/Readers/Org/Meta.hs
index c811f2363..89cd35b26 100644
--- a/test/Tests/Readers/Org/Meta.hs
+++ b/test/Tests/Readers/Org/Meta.hs
@@ -93,6 +93,13 @@ tests =
in Pandoc meta mempty
]
+ , "Subtitle" =:
+ T.unlines [ "#+SUBTITLE: Your Life in"
+ , "#+SUBTITLE: /Plain/ Text"
+ ] =?>
+ let subtitle = "Your Life in" <> softbreak <> emph "Plain" <> " Text"
+ in Pandoc (setMeta "subtitle" (toMetaValue subtitle) nullMeta) mempty
+
, "Keywords" =:
T.unlines [ "#+KEYWORDS: pandoc, testing,"
, "#+KEYWORDS: Org"