aboutsummaryrefslogtreecommitdiff
path: root/test/Tests
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2020-03-30 22:03:52 +0200
committerAlbert Krewinkel <albert@zeitkraut.de>2020-03-30 22:03:52 +0200
commit69a3fa57087f54df6fe24c447cfbad8563befd36 (patch)
treebb2a183bdb72b44b24bec22f9bf5d973d75b8e70 /test/Tests
parent0069773364b8fad9b5c23752d0eac7ef7c1d0f1d (diff)
downloadpandoc-69a3fa57087f54df6fe24c447cfbad8563befd36.tar.gz
Jira reader: retain image attributes
Jira images attributes as in `!image.jpg|align=right!` are retained as key-value pairs. Thumbnail images, such as `!example.gif|thumbnail!`, are marked by a `thumbnail` class in their attributes. Related to #6234.
Diffstat (limited to 'test/Tests')
-rw-r--r--test/Tests/Readers/Jira.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Tests/Readers/Jira.hs b/test/Tests/Readers/Jira.hs
index 299db7bed..1ae3244ab 100644
--- a/test/Tests/Readers/Jira.hs
+++ b/test/Tests/Readers/Jira.hs
@@ -117,6 +117,15 @@ tests =
"!https://example.com/image.jpg!" =?>
para (image "https://example.com/image.jpg" "" mempty)
+ , "thumbnail image" =:
+ "!image.jpg|thumbnail!" =?>
+ para (imageWith ("", ["thumbnail"], []) "image.jpg" "" mempty)
+
+ , "image with attributes" =:
+ "!image.gif|align=right, vspace=4, title=Hello!" =?>
+ let attr = ("", [], [("align", "right"), ("vspace", "4")])
+ in para $ imageWith attr "image.gif" "Hello" mempty
+
, "HTML entity" =:
"me &amp; you" =?> para "me & you"