Commit 0fe7ecd5 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Fix for Heading 9 when informative/normative is present

parent 09b9817e
Loading
Loading
Loading
Loading
Loading
+3
Changes for generateBaseline/postprocessing.py: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -956,7 +956,10 @@ def update_heading_styles(docx_input, docx_output):
            # Change style from Heading 1 to Heading 8
            pStyle_elems = para.xpath('./w:pPr/w:pStyle[@w:val="Heading1"]', namespaces=ns)
            if pStyle_elems:
                if re.search(r'(informative|normative|informative or normative|normative or informative)', annex_letter, re.IGNORECASE):
                    pStyle_elems[0].set(f"{{{ns['w']}}}val", "Heading8")# Heading8 for certain specs. editHelp is going to harmonise that 
                else:
                    pStyle_elems[0].set(f"{{{ns['w']}}}val", "Heading9")# Heading9 for certain specs. editHelp is going to harmonise that 
            insert_page_break_before_heading(para, full_text)  
            counter_annex += 1
        # Annex subheading Heading 2: "A.1 Title", not matching "A.1.1 Title"