From 4f06e6c4455b5b6be21416e9736a70f8d2b1ff1c Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Sun, 30 Oct 2016 20:23:53 +0100 Subject: Org reader: support `ATTR_HTML` for special blocks Special blocks (i.e. blocks with unrecognized names) can be prefixed with an `ATTR_HTML` block attribute. The attributes defined in that meta-directive are added to the `Div` which is used to represent the special block. Closes: #3182 --- tests/Tests/Readers/Org.hs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests') diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs index 3aa38ff0c..1b536551c 100644 --- a/tests/Tests/Readers/Org.hs +++ b/tests/Tests/Readers/Org.hs @@ -1625,6 +1625,15 @@ tests = ] =?> rawBlock "html" "\nboring\n\n" + , "Accept `ATTR_HTML` attributes for generic block" =: + unlines [ "#+ATTR_HTML: :title hello, world :id test :class fun code" + , "#+BEGIN_TEST" + , "nonsense" + , "#+END_TEST" + ] =?> + let attr = ("test", ["fun", "code", "TEST"], [("title", "hello, world")]) + in divWith attr (para "nonsense") + , "Non-letter chars in source block parameters" =: unlines [ "#+BEGIN_SRC C :tangle xxxx.c :city Zürich" , "code body" -- cgit v1.2.3