summaryrefslogtreecommitdiff
path: root/src/Tests/Writers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2011-02-05 08:16:34 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2011-02-05 08:16:34 -0800
commit6c0e86d1444e401af2590287a86c1963043fee2e (patch)
tree20fcd2f705a80747a8083b754b76559ecf4dc77f /src/Tests/Writers
parent798c5d55bbfff566a7de9713ec38f1db75c96970 (diff)
HTML writer: stringify alt text.
Previously, if you had formatting in the label of an Image element, you'd get escaped HTML in the alt attribute. Now you just get a plain string version, which seems preferable.
Diffstat (limited to 'src/Tests/Writers')
-rw-r--r--src/Tests/Writers/HTML.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Tests/Writers/HTML.hs b/src/Tests/Writers/HTML.hs
index e13d0dc87..3e1e0ddc2 100644
--- a/src/Tests/Writers/HTML.hs
+++ b/src/Tests/Writers/HTML.hs
@@ -38,4 +38,9 @@ tests = [ testGroup "inline code"
, "nolanguage" =: codeWith ("",["nolanguage"],[]) ">>="
=?> "<code class=\"nolanguage\">&gt;&gt;=</code>"
]
+ , testGroup "images"
+ [ "alt with formatting" =:
+ image "/url" "title" ("my " +++ emph "image")
+ =?> "<img src=\"/url\" title=\"title\" alt=\"my image\" />"
+ ]
]