From 0d7aedca58742f9c353010d9877ef666ee4c7af0 Mon Sep 17 00:00:00 2001 From: Jesse Rosenthal Date: Thu, 25 Jan 2018 10:31:40 -0500 Subject: Dock writer: Fix deletion track changes This had been mistakenly written as a second insertion function. Closes: #4303 --- src/Text/Pandoc/Writers/Docx.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/Text/Pandoc') 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 -- cgit v1.2.3