diff options
author | Jesse Rosenthal <jrosenthal@jhu.edu> | 2018-01-25 10:31:40 -0500 |
---|---|---|
committer | Jesse Rosenthal <jrosenthal@jhu.edu> | 2018-01-25 10:42:01 -0500 |
commit | 0d7aedca58742f9c353010d9877ef666ee4c7af0 (patch) | |
tree | 6a35ae2cd9a0c0b02161c8d90cde6f3e8a40f327 /src/Text/Pandoc/Writers | |
parent | 6337539e32cb1728e4cd9e6b1cce7313aaf04f03 (diff) | |
download | pandoc-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/Text/Pandoc/Writers')
-rw-r--r-- | src/Text/Pandoc/Writers/Docx.hs | 12 |
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 |