diff --git a/docx/text/paragraph.py b/docx/text/paragraph.py index 4fb583b94..ec211732f 100644 --- a/docx/text/paragraph.py +++ b/docx/text/paragraph.py @@ -126,10 +126,9 @@ def text(self): Paragraph-level formatting, such as style, is preserved. All run-level formatting, such as bold or italic, is removed. """ - text = '' - for run in self.runs: - text += run.text - return text + if not self.runs: + return '' + return ''.join([run.text for run in self.runs]) @text.setter def text(self, text):