aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Tests/Writers/HTML.hs5
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs3
2 files changed, 6 insertions, 2 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\" />"
+ ]
]
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index 7cc40e489..aba73a417 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -602,8 +602,7 @@ inlineToHtml opts inline =
if null tit then [] else [title tit]) $
linkText
(Image txt (s,tit)) -> do
- alternate <- inlineListToHtml opts txt
- let alternate' = showHtmlFragment alternate
+ let alternate' = stringify txt
let attributes = [src s] ++
(if null tit
then []