git.iko.soy/typeable/pandoc
on master help sign in
Org reader: fix planning elements in headers level 3 and higher
8b00bc6Albert Krewinkel
src/Text/Pandoc/Readers/Org/DocumentTree.hs+1−1
@@ -235,8 +235,8 @@ headlineToHeaderWithList hdln = do
235 else flattenHeader header
235 else flattenHeader header
236 return . mconcat $
236 return . mconcat $
237 [ headerText
237 [ headerText
238− , headlineContents hdln
239 , planningBlock
238 , planningBlock
239+ , headlineContents hdln
240 , listBlock
240 , listBlock
241 ]
241 ]
242 where
242 where
test/Tests/Readers/Org/Block/Header.hs+24
@@ -236,5 +236,29 @@ tests =
236 , " :END:"
236 , " :END:"
237 ] =?>
237 ] =?>
238 headerWith ("look", [], []) 1 "important"
238 headerWith ("look", [], []) 1 "important"
239+
240+ , "third and forth level headers" =:
241+ T.unlines [ "#+OPTIONS: p:t h:3"
242+ , "*** Third"
243+ , " CLOSED: [2018-09-05 Wed 13:58]"
244+ , " Text 3"
245+ , "**** Fourth"
246+ , "SCHEDULED: <2019-05-13 Mon 22:42>"
247+ , "Text 4"
248+ ] =?>
249+ mconcat
250+ [ headerWith ("third", [], mempty) 3 "Third"
251+ , plain $
252+ strong "CLOSED:" <> space <> emph (str "[2018-09-05 Wed 13:58]")
253+ , para "Text 3"
254+ , orderedList [
255+ mconcat
256+ [ para "Fourth"
257+ , plain $ strong "SCHEDULED:"
258+ <> space
259+ <> emph (str "<2019-05-13 Mon 22:42>")
260+ , para "Text 4"
261+ ]]
262+ ]
239 ]
263 ]
240 ]
264 ]