From d3c8acd07b713a6fc9c8e1016c8e18d151343b9b Mon Sep 17 00:00:00 2001 From: Nikolay Yakimov Date: Wed, 7 Nov 2018 23:17:35 +0300 Subject: [Docx Writer] Add bookmarks to code blocks --- src/Text/Pandoc/Writers/Docx.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs index 3419abb8b..6c3494f0e 100644 --- a/src/Text/Pandoc/Writers/Docx.hs +++ b/src/Text/Pandoc/Writers/Docx.hs @@ -934,10 +934,10 @@ blockToOpenXML' opts (BlockQuote blocks) = do p <- withParaPropM (pStyleM "Block Text") $ blocksToOpenXML opts blocks setFirstPara return p -blockToOpenXML' opts (CodeBlock attrs str) = do +blockToOpenXML' opts (CodeBlock attrs@(ident, _, _) str) = do p <- withParaProp (pCustomStyle "SourceCode") (blockToOpenXML opts $ Para [Code attrs str]) setFirstPara - return p + wrapBookmark ident p blockToOpenXML' _ HorizontalRule = do setFirstPara return [ -- cgit v1.2.3