Skip to content

Commit

Permalink
fix(docx): fix validation error on w:annotationRef
Browse files Browse the repository at this point in the history
annotationRef is not valid for `w:rPr`, only for `w:r` according to
wml.xsd.

See jgm#9269

Signed-off-by: Edwin Török <edwin@etorok.net>
  • Loading branch information
edwintorok committed Dec 18, 2023
1 parent 3b02734 commit 481e144
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Text/Pandoc/Writers/Docx.hs
Expand Up @@ -885,8 +885,8 @@ writeOpenXML opts (Pandoc meta blocks) = do
, mknode "w:r" []
[ mknode "w:rPr" []
[ mknode "w:rStyle" [("w:val", "CommentReference")] ()
, mknode "w:annotationRef" [] ()
]
, mknode "w:annotationRef" [] ()
]
] ++ annotation
]
Expand Down
Binary file modified test/docx/golden/comments.docx
Binary file not shown.
Binary file modified test/docx/golden/track_changes_scrubbed_metadata.docx
Binary file not shown.

0 comments on commit 481e144

Please sign in to comment.