diff options
author | Albert Krewinkel <albert@zeitkraut.de> | 2016-05-22 22:26:38 +0200 |
---|---|---|
committer | Albert Krewinkel <albert@zeitkraut.de> | 2016-05-23 09:44:37 +0200 |
commit | a4717c2fc5d82bc4740b21927ca7db3115a8b1af (patch) | |
tree | ed36e4954b9bb0ca15e14ed7d1dcc005c4cf718b /tests/Tests | |
parent | f3d27e4c80a8b33493cfdef9fda8247aaa14c801 (diff) | |
download | pandoc-a4717c2fc5d82bc4740b21927ca7db3115a8b1af.tar.gz |
Org reader: respect drawer export setting
The `d` export option can be used to control which drawers are exported
and which are discarded. Basic support for this option is added here.
Diffstat (limited to 'tests/Tests')
-rw-r--r-- | tests/Tests/Readers/Org.hs | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs index c478fedd6..780053059 100644 --- a/tests/Tests/Readers/Org.hs +++ b/tests/Tests/Readers/Org.hs @@ -420,9 +420,10 @@ tests = , "Drawers can be arbitrary" =: unlines [ ":FOO:" + , "/bar/" , ":END:" ] =?> - (mempty::Blocks) + divWith (mempty, ["FOO", "drawer"], mempty) (para $ emph "bar") , "Anchor reference" =: unlines [ "<<link-here>> Target." @@ -475,6 +476,28 @@ tests = , "a^b" ] =?> para "a^b" + + , "Export option: directly select drawers to be exported" =: + unlines [ "#+OPTIONS: d:(\"IMPORTANT\")" + , ":IMPORTANT:" + , "23" + , ":END:" + , ":BORING:" + , "very boring" + , ":END:" + ] =?> + divWith (mempty, ["IMPORTANT", "drawer"], mempty) (para "23") + + , "Export option: exclude drawers from being exported" =: + unlines [ "#+OPTIONS: d:(not \"BORING\")" + , ":IMPORTANT:" + , "5" + , ":END:" + , ":BORING:" + , "very boring" + , ":END:" + ] =?> + divWith (mempty, ["IMPORTANT", "drawer"], mempty) (para "5") ] , testGroup "Basic Blocks" $ |