Loading generateBaseline/postprocessing.py +2 −2 Changes for generateBaseline/postprocessing.py: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -710,7 +710,7 @@ def _is_in_abbreviations_clause(para, ns): if previous.tag != f'{{{w}}}p': previous = previous.getprevious() continue if _paragraph_style_val(previous, ns) == 'Heading2': if _paragraph_style_val(previous, ns).startswith('Heading'): # It can be Heading1, Heading2 or Heading3 heading_text = _normalize_ws(_paragraph_text(previous)) return bool(re.search(r'\babbreviations\b', heading_text, flags=re.IGNORECASE)) previous = previous.getprevious() Loading Loading @@ -1984,7 +1984,7 @@ def update_notes(docx_input, docx_output): all_children = [child for child in para if child.tag != f"{{{ns['w']}}}pPr"] # Check if text matches NOTE pattern: NOTE\s*\d*: note_pattern = re.compile(r'NOTES?\s*\d*:?\s+') note_pattern = re.compile(r'NOTES?\s*\d*:?\s*') note_match = note_pattern.search(full_text) # Check if text matches EXAMPLE pattern: EXAMPLE\s*\d*: example_pattern = re.compile(r'EXAMPLES?\s*\d*:?\s*') Loading Loading
generateBaseline/postprocessing.py +2 −2 Changes for generateBaseline/postprocessing.py: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -710,7 +710,7 @@ def _is_in_abbreviations_clause(para, ns): if previous.tag != f'{{{w}}}p': previous = previous.getprevious() continue if _paragraph_style_val(previous, ns) == 'Heading2': if _paragraph_style_val(previous, ns).startswith('Heading'): # It can be Heading1, Heading2 or Heading3 heading_text = _normalize_ws(_paragraph_text(previous)) return bool(re.search(r'\babbreviations\b', heading_text, flags=re.IGNORECASE)) previous = previous.getprevious() Loading Loading @@ -1984,7 +1984,7 @@ def update_notes(docx_input, docx_output): all_children = [child for child in para if child.tag != f"{{{ns['w']}}}pPr"] # Check if text matches NOTE pattern: NOTE\s*\d*: note_pattern = re.compile(r'NOTES?\s*\d*:?\s+') note_pattern = re.compile(r'NOTES?\s*\d*:?\s*') note_match = note_pattern.search(full_text) # Check if text matches EXAMPLE pattern: EXAMPLE\s*\d*: example_pattern = re.compile(r'EXAMPLES?\s*\d*:?\s*') Loading