diff options
author | mb21 <mb21@users.noreply.github.com> | 2016-03-09 23:16:02 +0100 |
---|---|---|
committer | mb21 <mb21@users.noreply.github.com> | 2016-03-10 08:56:08 +0100 |
commit | 139fa54d48a878c91f6e56c17ee50e9d589d379f (patch) | |
tree | d70189657db736262f0bb5ef5dc8202bdf577fe9 | |
parent | 2b55b76ebec87f4d35b2e641e054bd6dfc74be09 (diff) | |
download | pandoc-139fa54d48a878c91f6e56c17ee50e9d589d379f.tar.gz |
Docx Writer: handle image alt text
closes #2754
-rw-r--r-- | src/Text/Pandoc/Writers/Docx.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs index 150e19043..a841e1b66 100644 --- a/src/Text/Pandoc/Writers/Docx.hs +++ b/src/Text/Pandoc/Writers/Docx.hs @@ -1103,7 +1103,7 @@ inlineToOpenXML opts (Link _ txt (src,_)) = do M.insert src i extlinks } return i return [ mknode "w:hyperlink" [("r:id",id')] contents ] -inlineToOpenXML opts (Image attr alt (src, tit)) = do +inlineToOpenXML opts (Image attr alt (src, _)) = do -- first, check to see if we've already done this image pageWidth <- gets stPrintWidth imgs <- gets stImages @@ -1154,7 +1154,7 @@ inlineToOpenXML opts (Image attr alt (src, tit)) = do mknode "wp:inline" [] [ mknode "wp:extent" [("cx",show xemu),("cy",show yemu)] () , mknode "wp:effectExtent" [("b","0"),("l","0"),("r","0"),("t","0")] () - , mknode "wp:docPr" [("descr",tit),("id","1"),("name","Picture")] () + , mknode "wp:docPr" [("descr",stringify alt),("id","1"),("name","Picture")] () , graphic ] let imgext = case mt >>= extensionFromMimeType of Just x -> '.':x |