aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJesse Rosenthal <jrosenthal@jhu.edu>2018-01-25 10:31:40 -0500
committerJesse Rosenthal <jrosenthal@jhu.edu>2018-01-25 10:42:01 -0500
commit0d7aedca58742f9c353010d9877ef666ee4c7af0 (patch)
tree6a35ae2cd9a0c0b02161c8d90cde6f3e8a40f327 /src
parent6337539e32cb1728e4cd9e6b1cce7313aaf04f03 (diff)
downloadpandoc-0d7aedca58742f9c353010d9877ef666ee4c7af0.tar.gz
Dock writer: Fix deletion track changes
This had been mistakenly written as a second insertion function. Closes: #4303
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/Docx.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs
index 928eaa712..7cbc946cc 100644
--- a/src/Text/Pandoc/Writers/Docx.hs
+++ b/src/Text/Pandoc/Writers/Docx.hs
@@ -1146,18 +1146,18 @@ inlineToOpenXML' opts (Span (ident,classes,kvs) ils) = do
("w:author", author),
("w:date", date)] x ]
else return id
- delmod <- if "insertion" `elem` classes
+ delmod <- if "deletion" `elem` classes
then do
defaultAuthor <- asks envChangesAuthor
defaultDate <- asks envChangesDate
let author = fromMaybe defaultAuthor (lookup "author" kvs)
date = fromMaybe defaultDate (lookup "date" kvs)
- insId <- gets stInsId
- modify $ \s -> s{stInsId = insId + 1}
- return $ \f -> do
+ delId <- gets stDelId
+ modify $ \s -> s{stDelId = delId + 1}
+ return $ \f -> local (\env->env{envInDel=True}) $ do
x <- f
- return [mknode "w:ins"
- [("w:id", show insId),
+ return [mknode "w:del"
+ [("w:id", show delId),
("w:author", author),
("w:date", date)] x]
else return id