We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent da75fcf commit 6b0f2fdCopy full SHA for 6b0f2fd
1 file changed
docx/text/paragraph.py
@@ -136,6 +136,19 @@ def text(self, text):
136
self.clear()
137
self.add_run(text)
138
139
+ @property
140
+ def accepted_text(self):
141
+ """
142
+ String formed by accepting all changes and concatenating
143
+ the text of each run in the paragraph.
144
+ Tabs and line breaks in the XML are mapped to ``\\t`` and ``\\n``
145
+ characters respectively.
146
147
+ text = ''
148
+ for run_text in self._p.xpath(".//w:t"):
149
+ text += run_text.text
150
+ return text
151
+
152
def _insert_paragraph_before(self):
153
"""
154
Return a newly created paragraph, inserted directly before this
0 commit comments