diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index 0f7bc85c8..e3be8b9fb 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -1552,6 +1552,7 @@ inlineToHtml opts inline = do then link' else link' ! A.title (toValue tit) (Image attr@(_, _, attrList) txt (s, tit)) -> do + epubVersion <- gets stEPUBVersion let alternate = stringify txt slideVariant <- gets stSlideVariant let isReveal = slideVariant == RevealJsSlides @@ -1564,8 +1565,9 @@ inlineToHtml opts inline = do [A.title $ toValue tit | not (T.null tit)] ++ attrs imageTag = (if html5 then H5.img else H.img - , [A.alt $ toValue alternate | not (null txt) && - isNothing (lookup "alt" attrList)] ) + , [A.alt $ toValue alternate | + isNothing (lookup "alt" attrList) && + (isJust epubVersion || not (null txt))] ) mediaTag tg fallbackTxt = let linkTxt = if null txt then fallbackTxt |
