Loading generateBaseline/postprocessing.py +3 −1 Changes for generateBaseline/postprocessing.py: 3 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -2510,7 +2510,9 @@ def update_references(docx_input, docx_output): ref_index = list(parent).index(reference_run) parent.insert(ref_index + 1, tab_run) # Trim any space in the next w:r/w:t element after the tab run next_elem = parent[ref_index + 2] next_index = ref_index + 2 if next_index < len(parent): next_elem = parent[next_index] if next_elem.tag.endswith('}r') and next_elem.xpath('.//w:t', namespaces=ns): next_text = next_elem.xpath('.//w:t', namespaces=ns)[0].text if next_text: Loading Loading
generateBaseline/postprocessing.py +3 −1 Changes for generateBaseline/postprocessing.py: 3 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -2510,7 +2510,9 @@ def update_references(docx_input, docx_output): ref_index = list(parent).index(reference_run) parent.insert(ref_index + 1, tab_run) # Trim any space in the next w:r/w:t element after the tab run next_elem = parent[ref_index + 2] next_index = ref_index + 2 if next_index < len(parent): next_elem = parent[next_index] if next_elem.tag.endswith('}r') and next_elem.xpath('.//w:t', namespaces=ns): next_text = next_elem.xpath('.//w:t', namespaces=ns)[0].text if next_text: Loading