aboutsummaryrefslogtreecommitdiff
path: root/test/Tests/Readers
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2020-06-26 15:50:53 +0200
committerAlbert Krewinkel <albert@zeitkraut.de>2020-06-27 09:11:00 +0200
commit8dce28d9494d4aaa0409eaa719cce4f46e4bf353 (patch)
tree7d2c5061152b69ec0ba6cabf731c7860f2756a01 /test/Tests/Readers
parent9e6e9a72218e8c408e151bf8b169f44a8c55eb40 (diff)
downloadpandoc-8dce28d9494d4aaa0409eaa719cce4f46e4bf353.tar.gz
Org reader: read description lines as inlines
`#+DESCRIPTION` lines are treated as text with markup. If multiple such lines are given, then all lines are read and separated by soft linebreaks. Closes: #6485
Diffstat (limited to 'test/Tests/Readers')
-rw-r--r--test/Tests/Readers/Org/Meta.hs22
1 files changed, 17 insertions, 5 deletions
diff --git a/test/Tests/Readers/Org/Meta.hs b/test/Tests/Readers/Org/Meta.hs
index c3ace78d4..27fd20744 100644
--- a/test/Tests/Readers/Org/Meta.hs
+++ b/test/Tests/Readers/Org/Meta.hs
@@ -65,11 +65,23 @@ tests =
meta = setMeta "date" (MetaInlines date) nullMeta
in Pandoc meta mempty
- , "Description" =:
- "#+DESCRIPTION: Explanatory text" =?>
- let description = "Explanatory text"
- meta = setMeta "description" (MetaString description) nullMeta
- in Pandoc meta mempty
+ , testGroup "Description"
+ [ "Single line" =:
+ "#+DESCRIPTION: Explanatory text" =?>
+ let description = [Str "Explanatory", Space, Str "text"]
+ meta = setMeta "description" (MetaInlines description) nullMeta
+ in Pandoc meta mempty
+
+ , "Multiline" =:
+ T.unlines [ "#+DESCRIPTION: /Short/ introduction"
+ , "#+DESCRIPTION: to Org-mode"
+ ] =?>
+ let description = [ Emph [Str "Short"], Space, Str "introduction", SoftBreak
+ , Str "to", Space, Str "Org-mode"
+ ]
+ meta = setMeta "description" (MetaInlines description) nullMeta
+ in Pandoc meta mempty
+ ]
, "Properties drawer" =:
T.unlines [ " :PROPERTIES:"