git.iko.soy/typeable/pandoc
on master help sign in
Dock writer: Fix deletion track changes

This had been mistakenly written as a second insertion function. Closes: #4303

commit0d7aedca58742f9c353010d9877ef666ee4c7af0 authorJesse Rosenthal <jrosenthal@jhu.edu> dateThu 25 Jan 2018, 10:31 (9 years ago) parent6337539
1 file changed+6−6
src/Text/Pandoc/Writers/Docx.hs+6−6
src/Text/Pandoc/Writers/Docx.hs+6−6
@@ -1146,18 +1146,18 @@ inlineToOpenXML' opts (Span (ident,classes,kvs) ils) = do
11461146 ("w:author", author),
11471147 ("w:date", date)] x ]
11481148 else return id
1149− delmod <- if "insertion" `elem` classes
1149+ delmod <- if "deletion" `elem` classes
11501150 then do
11511151 defaultAuthor <- asks envChangesAuthor
11521152 defaultDate <- asks envChangesDate
11531153 let author = fromMaybe defaultAuthor (lookup "author" kvs)
11541154 date = fromMaybe defaultDate (lookup "date" kvs)
1155− insId <- gets stInsId
1156− modify $ \s -> s{stInsId = insId + 1}
1157− return $ \f -> do
1155+ delId <- gets stDelId
1156+ modify $ \s -> s{stDelId = delId + 1}
1157+ return $ \f -> local (\env->env{envInDel=True}) $ do
11581158 x <- f
1159− return [mknode "w:ins"
1160− [("w:id", show insId),
1159+ return [mknode "w:del"
1160+ [("w:id", show delId),
11611161 ("w:author", author),
11621162 ("w:date", date)] x]
11631163 else return id