aboutsummaryrefslogtreecommitdiff
path: root/tests/Tests
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2016-11-09 22:49:20 +0100
committerAlbert Krewinkel <albert@zeitkraut.de>2016-11-09 22:49:20 +0100
commit7e5220b57c5a48fabe6e43ba270db812593d3463 (patch)
treefbd2754b01503e766413b312770c39251fde8f57 /tests/Tests
parent13bc573e7f9e0602404dd37fec2c7cd14b5c56ee (diff)
downloadpandoc-7e5220b57c5a48fabe6e43ba270db812593d3463.tar.gz
Org reader: allow HTML attribs on non-figure images
Images which are the only element in a paragraph can still be given HTML attributes, even if the image does not have a caption and is hence not a figure. The following will add set the `width` attribute of the image to `50%`: #+ATTR_HTML: :width 50% [[file:image.jpg]] Closes: #3222
Diffstat (limited to 'tests/Tests')
-rw-r--r--tests/Tests/Readers/Org.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs
index 1b536551c..882701644 100644
--- a/tests/Tests/Readers/Org.hs
+++ b/tests/Tests/Readers/Org.hs
@@ -196,6 +196,12 @@ tests =
"[[file:sunrise.jpg]]" =?>
(para $ image "sunrise.jpg" "" "")
+ , "Image with html attributes" =:
+ unlines [ "#+ATTR_HTML: :width 50%"
+ , "[[file:guinea-pig.gif]]"
+ ] =?>
+ (para $ imageWith ("", [], [("width", "50%")]) "guinea-pig.gif" "" "")
+
, "Explicit link" =:
"[[http://zeitlens.com/][pseudo-random /nonsense/]]" =?>
(para $ link "http://zeitlens.com/" ""