diff options
author | Albert Krewinkel <albert@zeitkraut.de> | 2021-03-13 12:10:02 +0100 |
---|---|---|
committer | Albert Krewinkel <albert@zeitkraut.de> | 2021-03-13 12:10:02 +0100 |
commit | a8aa301428752d96cdd58d7f4ecaa7d054f3505d (patch) | |
tree | d0d6185e597eaa8c2029136be70a3811e2a73b94 /test | |
parent | 894ed8ebb01ce11cbcc6afc13d00d6ac1dd05ed0 (diff) | |
download | pandoc-a8aa301428752d96cdd58d7f4ecaa7d054f3505d.tar.gz |
Jira writer: improve div/panel handling
Include div attributes in panels, always render divs with class `panel`
as panels, and avoid nesting of panels.
Diffstat (limited to 'test')
-rw-r--r-- | test/Tests/Writers/Jira.hs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/Tests/Writers/Jira.hs b/test/Tests/Writers/Jira.hs index b618c3970..0c6f48853 100644 --- a/test/Tests/Writers/Jira.hs +++ b/test/Tests/Writers/Jira.hs @@ -79,4 +79,34 @@ tests = "{noformat}\npreformatted\n text.\n{noformat}" ] ] + + , testGroup "blocks" + [ testGroup "div" + [ "empty attributes" =: + divWith nullAttr (para "interesting text") =?> + "interesting text" + + , "just identifier" =: + divWith ("a", [], []) (para "interesting text") =?> + "{anchor:a}interesting text" + + , "with class 'panel'" =: + divWith ("", ["panel"], []) (para "Contents!") =?> + "{panel}\nContents\\!\n{panel}\n" + + , "panel with id" =: + divWith ("b", ["panel"], []) (para "text") =?> + "{panel}\n{anchor:b}text\n{panel}\n" + + , "title attribute" =: + divWith ("", [], [("title", "Gimme!")]) (para "Contents!") =?> + "{panel:title=Gimme!}\nContents\\!\n{panel}\n" + + , "nested panels" =: + let panelAttr = ("", ["panel"], []) + in divWith panelAttr (para "hi" <> + divWith panelAttr (para "wassup?")) =?> + "{panel}\nhi\n\nwassup?\n{panel}\n" + ] + ] ] |