aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index f554d4887..43c3cce4b 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -407,7 +407,10 @@ inlineToHtml opts inline =
(Image txt (source,tit)) -> do
alternate <- inlineListToHtml opts txt
let alternate' = renderHtmlFragment alternate
- let attributes = [src source, title tit] ++
+ let attributes = [src source] ++
+ (if null tit
+ then []
+ else [title tit]) ++
if null txt
then []
else [alt alternate']