@@ -365,7 +365,7 @@ parPartToInlines' (ChangedRuns (TrackedChange Insertion (ChangeInfo _ author dat
365365 RejectChanges -> return mempty
366366 AllChanges -> do
367367 ils <- smushInlines <$> mapM runToInlines runs
368− let attr = ("", ["insertion"], [("author", author), ("date", date)])
368+ let attr = ("", ["insertion"], addAuthorAndDate author date)
369369 return $ spanWith attr ils
370370parPartToInlines' (ChangedRuns (TrackedChange Deletion (ChangeInfo _ author date)) runs) = do
371371 opts <- asks docxOptions
@@ -374,7 +374,7 @@ parPartToInlines' (ChangedRuns (TrackedChange Deletion (ChangeInfo _ author date
374374 RejectChanges -> smushInlines <$> mapM runToInlines runs
375375 AllChanges -> do
376376 ils <- smushInlines <$> mapM runToInlines runs
377− let attr = ("", ["deletion"], [("author", author), ("date", date)])
377+ let attr = ("", ["deletion"], addAuthorAndDate author date)
378378 return $ spanWith attr ils
379379parPartToInlines' (CommentStart cmtId author date bodyParts) = do
380380 opts <- asks docxOptions
@@ -382,7 +382,7 @@ parPartToInlines' (CommentStart cmtId author date bodyParts) = do
382382 AllChanges -> do
383383 blks <- smushBlocks <$> mapM bodyPartToBlocks bodyParts
384384 ils <- blocksToInlinesWarn cmtId blks
385− let attr = ("", ["comment-start"], [("id", cmtId), ("author", author), ("date", date)])
385+ let attr = ("", ["comment-start"], ("id", cmtId) : addAuthorAndDate author date)
386386 return $ spanWith attr ils
387387 _ -> return mempty
388388parPartToInlines' (CommentEnd cmtId) = do
@@ -593,7 +593,7 @@ bodyPartToBlocks (Paragraph pPr parparts)
593593 return mempty
594594 (Just (TrackedChange Insertion (ChangeInfo _ cAuthor cDate))
595595 , AllChanges) -> do
596− let attr = ("", ["paragraph-insertion"], [("author", cAuthor), ("date", cDate)])
596+ let attr = ("", ["paragraph-insertion"], addAuthorAndDate cAuthor cDate)
597597 insertMark = spanWith attr mempty
598598 transform <- parStyleToTransform pPr'
599599 return $ transform $
@@ -605,7 +605,7 @@ bodyPartToBlocks (Paragraph pPr parparts)
605605 handleInsertion
606606 (Just (TrackedChange Deletion (ChangeInfo _ cAuthor cDate))
607607 , AllChanges) -> do
608− let attr = ("", ["paragraph-deletion"], [("author", cAuthor), ("date", cDate)])
608+ let attr = ("", ["paragraph-deletion"], addAuthorAndDate cAuthor cDate)
609609 insertMark = spanWith attr mempty
610610 transform <- parStyleToTransform pPr'
611611 return $ transform $
@@ -732,3 +732,8 @@ docxToOutput :: PandocMonad m
732732docxToOutput opts (Docx (Document _ body)) =
733733 let dEnv = def { docxOptions = opts} in
734734 evalDocxContext (bodyToOutput body) dEnv def
735+
736+addAuthorAndDate :: T.Text -> Maybe T.Text -> [(T.Text, T.Text)]
737+addAuthorAndDate author mdate =
738+ ("author", author) : maybe [] (\date -> [("date", date)]) mdate
739+