aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorNikolay Yakimov <root@livid.pp.ru>2018-11-07 23:17:35 +0300
committerNikolay Yakimov <root@livid.pp.ru>2018-11-07 23:17:35 +0300
commitd3c8acd07b713a6fc9c8e1016c8e18d151343b9b (patch)
tree737e75e57215e45ef80d64e2139ad22af795a8a3 /src/Text/Pandoc
parent06e207c66243e2e57925118b005027a996faa488 (diff)
downloadpandoc-d3c8acd07b713a6fc9c8e1016c8e18d151343b9b.tar.gz
[Docx Writer] Add bookmarks to code blocks
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Writers/Docx.hs4
1 files changed, 2 insertions, 2 deletions
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 [