Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docx/text/paragraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,19 @@ def text(self, text):
self.clear()
self.add_run(text)

@property
def accepted_text(self):
"""
String formed by accepting all changes and concatenating
the text of each run in the paragraph.
Tabs and line breaks in the XML are mapped to ``\\t`` and ``\\n``
characters respectively.
"""
text = ''
for run_text in self._p.xpath(".//w:t"):
text += run_text.text
return text

def _insert_paragraph_before(self):
"""
Return a newly created paragraph, inserted directly before this
Expand Down