From 69a3fa57087f54df6fe24c447cfbad8563befd36 Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Mon, 30 Mar 2020 22:03:52 +0200 Subject: 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. --- test/Tests/Readers/Jira.hs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test') 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 & you" =?> para "me & you" -- cgit v1.2.3