diff options
author | Albert Krewinkel <albert@zeitkraut.de> | 2021-03-08 12:40:25 +0100 |
---|---|---|
committer | Albert Krewinkel <albert@zeitkraut.de> | 2021-03-08 12:50:35 +0100 |
commit | eb184d9148e8a3e8c896a71550b1f0bee8da9a21 (patch) | |
tree | e61b74f345de61b0cb5bf8de00e7f4c33d6faba7 /test/Tests | |
parent | efc9f4a762c0290579c41c465685accd8e90eba3 (diff) | |
download | pandoc-eb184d9148e8a3e8c896a71550b1f0bee8da9a21.tar.gz |
Jira writer: use noformat instead of code for unknown languages.
Code blocks that are not marked as a language supported by Jira are
rendered as preformatted text with `{noformat}` blocks.
Fixes: tarleb/jira-wiki-markup#4
Diffstat (limited to 'test/Tests')
-rw-r--r-- | test/Tests/Writers/Jira.hs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Tests/Writers/Jira.hs b/test/Tests/Writers/Jira.hs index aff8348d4..b618c3970 100644 --- a/test/Tests/Writers/Jira.hs +++ b/test/Tests/Writers/Jira.hs @@ -68,5 +68,15 @@ tests = spanWith ("unicorn", [], []) (str "Unicorn") =?> "{anchor:unicorn}Unicorn" ] + + , testGroup "code" + [ "code block with known language" =: + codeBlockWith ("", ["java"], []) "Book book = new Book(\"Algebra\")" =?> + "{code:java}\nBook book = new Book(\"Algebra\")\n{code}" + + , "code block without language" =: + codeBlockWith ("", [], []) "preformatted\n text.\n" =?> + "{noformat}\npreformatted\n text.\n{noformat}" + ] ] ] |