diff options
author | Nikolay Yakimov <root@livid.pp.ru> | 2018-11-07 23:17:26 +0300 |
---|---|---|
committer | Nikolay Yakimov <root@livid.pp.ru> | 2018-11-07 23:17:26 +0300 |
commit | 06e207c66243e2e57925118b005027a996faa488 (patch) | |
tree | 04a6e1eae82c47f1f77406b33a496e70ba7dd434 /src/Text | |
parent | c6e85178e5b4c04428abb6f6bbdf96f76a31c6bd (diff) | |
download | pandoc-06e207c66243e2e57925118b005027a996faa488.tar.gz |
[Docx Writer] Add bookmarks to images
Diffstat (limited to 'src/Text')
-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 935e9e465..3419abb8b 100644 --- a/src/Text/Pandoc/Writers/Docx.hs +++ b/src/Text/Pandoc/Writers/Docx.hs @@ -1281,7 +1281,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, title)) = do +inlineToOpenXML' opts (Image attr@(imgident, _, _) alt (src, title)) = do pageWidth <- asks envPrintWidth imgs <- gets stImages let @@ -1343,7 +1343,7 @@ inlineToOpenXML' opts (Image attr alt (src, title)) = do in imgElt - case stImage of + wrapBookmark imgident =<< case stImage of Just imgData -> return [generateImgElt imgData] Nothing -> ( do --try (img, mt) <- P.fetchItem src |