@@ -785,22 +785,15 @@ inlineToHtml opts inline =
785785 then link'
786786 else link' ! A.title (toValue tit)
787787 (Image txt (s,tit)) | treatAsImage s -> do
788− let alternate' = stringify txt
789788 let attributes = [A.src $ toValue s] ++
790− (if null tit
791− then []
792− else [A.title $ toValue tit]) ++
793− if null txt
794− then []
795− else [A.alt $ toValue alternate']
789+ [A.title $ toValue tit | not $ null tit] ++
790+ [A.alt $ toValue $ stringify txt]
796791 let tag = if writerHtml5 opts then H5.img else H.img
797792 return $ foldl (!) tag attributes
798793 -- note: null title included, as in Markdown.pl
799794 (Image _ (s,tit)) -> do
800795 let attributes = [A.src $ toValue s] ++
801− (if null tit
802− then []
803− else [A.title $ toValue tit])
796+ [A.title $ toValue tit | not $ null tit]
804797 return $ foldl (!) H5.embed attributes
805798 -- note: null title included, as in Markdown.pl
806799 (Note contents)