From 8dce28d9494d4aaa0409eaa719cce4f46e4bf353 Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Fri, 26 Jun 2020 15:50:53 +0200 Subject: 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 --- test/Tests/Readers/Org/Meta.hs | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'test/Tests/Readers/Org') 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:" -- cgit v1.2.3