aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
diff options
context:
space:
mode:
authorKonstantin Zudov <konstantin@anche.no>2015-01-29 22:09:35 +0200
committerKonstantin Zudov <konstantin@anche.no>2015-01-29 22:16:38 +0200
commitb5cc01e9765e37cb8367a00a0b1a6b8af57cc9e5 (patch)
treec10ae40e8dfded7f5e8c9744d9a1ca0ce959fbf5 /src/Text/Pandoc/Writers
parent82c04a28cee407b0fcf56224b6c63d014e2c1c39 (diff)
downloadpandoc-b5cc01e9765e37cb8367a00a0b1a6b8af57cc9e5.tar.gz
Do not ommit missing `alt` attribute on `img` tag
Fixes #1131
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index 955c1b208..113965568 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -785,14 +785,11 @@ inlineToHtml opts inline =
then link'
else link' ! A.title (toValue tit)
(Image txt (s,tit)) | treatAsImage s -> do
- let alternate' = stringify txt
let attributes = [A.src $ toValue s] ++
(if null tit
then []
else [A.title $ toValue tit]) ++
- if null txt
- then []
- else [A.alt $ toValue alternate']
+ [A.alt $ toValue $ stringify txt]
let tag = if writerHtml5 opts then H5.img else H.img
return $ foldl (!) tag attributes
-- note: null title included, as in Markdown.pl