From bf93c07267bf138f4f4cab7625ff273fa2ac67cd Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Sat, 27 May 2017 15:24:01 +0200 Subject: Org reader: subject full doc tree to headline transformations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Emacs parses org documents into a tree structure, which is then post-processed during exporting. The reader is changed to do the same, turning the document into a single tree of headlines starting at levelĀ 0. Fixes: #3695 --- test/Tests/Readers/Org.hs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'test/Tests/Readers') diff --git a/test/Tests/Readers/Org.hs b/test/Tests/Readers/Org.hs index eb5b68dc9..37ad2462b 100644 --- a/test/Tests/Readers/Org.hs +++ b/test/Tests/Readers/Org.hs @@ -708,16 +708,30 @@ tests = , "limit headline depth" =: unlines [ "#+OPTIONS: H:2" - , "* section" + , "* top-level section" , "** subsection" , "*** list item 1" , "*** list item 2" ] =?> - mconcat [ headerWith ("section", [], []) 1 "section" + mconcat [ headerWith ("top-level-section", [], []) 1 "top-level section" , headerWith ("subsection", [], []) 2 "subsection" , orderedList [ para "list item 1", para "list item 2" ] ] + , "turn all headlines into lists" =: + unlines [ "#+OPTIONS: H:0" + , "first block" + , "* top-level section 1" + , "** subsection" + , "* top-level section 2" + ] =?> + mconcat [ para "first block" + , orderedList + [ (para "top-level section 1" <> + orderedList [ para "subsection" ]) + , para "top-level section 2" ] + ] + , "disable author export" =: unlines [ "#+OPTIONS: author:nil" , "#+AUTHOR: ShyGuy" -- cgit v1.2.3