From c17c62a2c74bbb6e36e12feea5aa6ba8679a023a Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Sun, 29 May 2016 20:00:52 +0200 Subject: Org reader: support new syntax for export blocks Org-mode version 9 usees a new syntax for export blocks. Instead of `#+BEGIN_`, where `` is the format of the block's content, the new format uses `#+BEGIN_export ` instead. Both types are supported. --- tests/Tests/Readers/Org.hs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs index 780053059..345ed462a 100644 --- a/tests/Tests/Readers/Org.hs +++ b/tests/Tests/Readers/Org.hs @@ -1293,7 +1293,7 @@ tests = ] ] - , "Verse block with newlines" =: + , "Verse block with blank lines" =: unlines [ "#+BEGIN_VERSE" , "foo" , "" @@ -1302,6 +1302,20 @@ tests = ] =?> para ("foo" <> linebreak <> linebreak <> "bar") + , "Raw block LaTeX" =: + unlines [ "#+BEGIN_LaTeX" + , "The category $\\cat{Set}$ is adhesive." + , "#+END_LaTeX" + ] =?> + rawBlock "latex" "The category $\\cat{Set}$ is adhesive.\n" + + , "Export block HTML" =: + unlines [ "#+BEGIN_export html" + , "Hello, World!" + , "#+END_export" + ] =?> + rawBlock "html" "Hello, World!\n" + , "LaTeX fragment" =: unlines [ "\\begin{equation}" , "X_i = \\begin{cases}" -- cgit v1.2.3