Loading generateBaseline/postprocessing.py +12 Changes for generateBaseline/postprocessing.py: 12 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -975,6 +975,18 @@ def update_heading_styles(docx_input, docx_output): if pStyle_elems: pStyle_elems[0].set(f"{{{ns['w']}}}val", "Heading2")# Heading9 for certain specs. editHelp is going to harmonise that counter_annex += 1 # Annex subheading Heading 3+: "A.1.1 Title", "A.1.1.1 Title" elif (match := re.match(r'^\s*([A-Z]\.\d+(?:\.\d+)+)\s+(.+)$', full_text)) is not None: annex_letter = match.group(1) annex_title = match.group(2) # Clear all existing runs from the paragraph for run in runs: para.remove(run) # Create new run with number + break + rest create_new_run(para, annex_letter, annex_title, "tab") counter_annex += 1 elif re.match(r'^\s*History\s*', full_text): insert_page_break_before_heading(para, full_text) elif full_text.strip().lower() == "essential patents" or full_text.strip().lower() == "trademarks": Loading Loading
generateBaseline/postprocessing.py +12 Changes for generateBaseline/postprocessing.py: 12 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -975,6 +975,18 @@ def update_heading_styles(docx_input, docx_output): if pStyle_elems: pStyle_elems[0].set(f"{{{ns['w']}}}val", "Heading2")# Heading9 for certain specs. editHelp is going to harmonise that counter_annex += 1 # Annex subheading Heading 3+: "A.1.1 Title", "A.1.1.1 Title" elif (match := re.match(r'^\s*([A-Z]\.\d+(?:\.\d+)+)\s+(.+)$', full_text)) is not None: annex_letter = match.group(1) annex_title = match.group(2) # Clear all existing runs from the paragraph for run in runs: para.remove(run) # Create new run with number + break + rest create_new_run(para, annex_letter, annex_title, "tab") counter_annex += 1 elif re.match(r'^\s*History\s*', full_text): insert_page_break_before_heading(para, full_text) elif full_text.strip().lower() == "essential patents" or full_text.strip().lower() == "trademarks": Loading