Loading generateBaseline/postprocessing.py +3 −3 Original line number Diff line number Diff line Loading @@ -1897,11 +1897,11 @@ def update_references(docx_input, docx_output): new_style = "EX" counter = 0 # Loop over all paragraphs with style "BodyText" and change to "EX" for para in root.xpath('.//w:p[w:pPr/w:pStyle[@w:val="BodyText"]]', namespaces=ns): # Loop over all paragraphs with style "BodyText" or "FirstParagraph" and change to "EX" for para in root.xpath('.//w:p[w:pPr/w:pStyle[@w:val="BodyText" or @w:val="FirstParagraph"]]', namespaces=ns): old_val = para.get(f"{{{ns['w']}}}val") # A reference is a paragraph that contains: # - A pPr with pStyle "BodyText" (already checked in loop) # - A pPr with pStyle "BodyText" or "FirstParagraph" (already checked in loop) # - A bookmarkStart and a bookmarkEnd # - A run with text matching either \[\d+\] or \[i\.\d+\] # - An hyperlink element Loading Loading
generateBaseline/postprocessing.py +3 −3 Original line number Diff line number Diff line Loading @@ -1897,11 +1897,11 @@ def update_references(docx_input, docx_output): new_style = "EX" counter = 0 # Loop over all paragraphs with style "BodyText" and change to "EX" for para in root.xpath('.//w:p[w:pPr/w:pStyle[@w:val="BodyText"]]', namespaces=ns): # Loop over all paragraphs with style "BodyText" or "FirstParagraph" and change to "EX" for para in root.xpath('.//w:p[w:pPr/w:pStyle[@w:val="BodyText" or @w:val="FirstParagraph"]]', namespaces=ns): old_val = para.get(f"{{{ns['w']}}}val") # A reference is a paragraph that contains: # - A pPr with pStyle "BodyText" (already checked in loop) # - A pPr with pStyle "BodyText" or "FirstParagraph" (already checked in loop) # - A bookmarkStart and a bookmarkEnd # - A run with text matching either \[\d+\] or \[i\.\d+\] # - An hyperlink element Loading