aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Readers/Org/DocumentTree.hs2
-rw-r--r--test/Tests/Readers/Org/Block/Header.hs24
2 files changed, 25 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Org/DocumentTree.hs b/src/Text/Pandoc/Readers/Org/DocumentTree.hs
index 07b3178ff..c96087be7 100644
--- a/src/Text/Pandoc/Readers/Org/DocumentTree.hs
+++ b/src/Text/Pandoc/Readers/Org/DocumentTree.hs
@@ -235,8 +235,8 @@ headlineToHeaderWithList hdln = do
else flattenHeader header
return . mconcat $
[ headerText
- , headlineContents hdln
, planningBlock
+ , headlineContents hdln
, listBlock
]
where
diff --git a/test/Tests/Readers/Org/Block/Header.hs b/test/Tests/Readers/Org/Block/Header.hs
index 5636d9c2a..37ccd194d 100644
--- a/test/Tests/Readers/Org/Block/Header.hs
+++ b/test/Tests/Readers/Org/Block/Header.hs
@@ -236,5 +236,29 @@ tests =
, " :END:"
] =?>
headerWith ("look", [], []) 1 "important"
+
+ , "third and forth level headers" =:
+ T.unlines [ "#+OPTIONS: p:t h:3"
+ , "*** Third"
+ , " CLOSED: [2018-09-05 Wed 13:58]"
+ , " Text 3"
+ , "**** Fourth"
+ , "SCHEDULED: <2019-05-13 Mon 22:42>"
+ , "Text 4"
+ ] =?>
+ mconcat
+ [ headerWith ("third", [], mempty) 3 "Third"
+ , plain $
+ strong "CLOSED:" <> space <> emph (str "[2018-09-05 Wed 13:58]")
+ , para "Text 3"
+ , orderedList [
+ mconcat
+ [ para "Fourth"
+ , plain $ strong "SCHEDULED:"
+ <> space
+ <> emph (str "<2019-05-13 Mon 22:42>")
+ , para "Text 4"
+ ]]
+ ]
]
]