Fix referenced before assignment regression introduced with #121. (#125)

Co-authored-by: Eric Patey <>
This commit is contained in:
Eric Patey
2025-02-04 21:51:59 -05:00
committed by GitHub
parent 983283a86a
commit 3ee6c34a36

View File

@@ -64,6 +64,7 @@ def contains_page_break(docx_file, rules):
namespaces = {'w': 'http://schemas.openxmlformats.org/wordprocessingml/2006/main'}
page_break_count = 0
for paragraph in doc.paragraphs:
for run in paragraph.runs:
br_elems = run.element.findall('.//w:br', namespaces)