aboutsummaryrefslogtreecommitdiff
path: root/tests/Tests
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2016-08-30 18:10:24 +0200
committerAlbert Krewinkel <albert@zeitkraut.de>2016-08-30 18:10:24 +0200
commit21cd76c2012457cfb14aa064ebf0c007b47da82f (patch)
tree1a7ac76e4f07c223ea5d427630f19550b0a6432d /tests/Tests
parentabc4bca46bbebc81bfa78c96aa594ae48dfea2f0 (diff)
downloadpandoc-21cd76c2012457cfb14aa064ebf0c007b47da82f.tar.gz
Org reader: respect unnumbered header property
Sections the `unnumbered` property should, as the name implies, be excluded from the automatic numbering of section provided by some output formats. The Pandoc convention for this is to add an "unnumbered" class to the header. The reader treats properties as key-value pairs per default, so a special case is added to translate the above property to a class instead. Closes #3095.
Diffstat (limited to 'tests/Tests')
-rw-r--r--tests/Tests/Readers/Org.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs
index d6e7bba22..d4fedc797 100644
--- a/tests/Tests/Readers/Org.hs
+++ b/tests/Tests/Readers/Org.hs
@@ -818,6 +818,15 @@ tests =
] =?>
headerWith ("fubar", [], [("bar", "baz")]) 1 "foo"
+
+ , "Headers marked with a unnumbered property get a class of the same name" =:
+ unlines [ "* Not numbered"
+ , " :PROPERTIES:"
+ , " :UNNUMBERED: t"
+ , " :END:"
+ ] =?>
+ headerWith ("not-numbered", ["unnumbered"], []) 1 "Not numbered"
+
, "Paragraph starting with an asterisk" =:
"*five" =?>
para "*five"