Add a single comment to commentsExtended.xml.
(self, para_id, parent_para_id)
| 1089 | editor.append_to(root, comment_xml) |
| 1090 | |
| 1091 | def _add_to_comments_extended_xml(self, para_id, parent_para_id): |
| 1092 | """Add a single comment to commentsExtended.xml.""" |
| 1093 | if not self.comments_extended_path.exists(): |
| 1094 | shutil.copy( |
| 1095 | TEMPLATE_DIR / "commentsExtended.xml", self.comments_extended_path |
| 1096 | ) |
| 1097 | |
| 1098 | editor = self["word/commentsExtended.xml"] |
| 1099 | root = editor.get_node(tag="w15:commentsEx") |
| 1100 | |
| 1101 | if parent_para_id: |
| 1102 | xml = f'<w15:commentEx w15:paraId="{para_id}" w15:paraIdParent="{parent_para_id}" w15:done="0"/>' |
| 1103 | else: |
| 1104 | xml = f'<w15:commentEx w15:paraId="{para_id}" w15:done="0"/>' |
| 1105 | editor.append_to(root, xml) |
| 1106 | |
| 1107 | def _add_to_comments_ids_xml(self, para_id, durable_id): |
| 1108 | """Add a single comment to commentsIds.xml.""" |
no test coverage detected