Loading md_to_docx_converter/src/to_docx/preprocessing.py +2 −2 Original line number Diff line number Diff line Loading @@ -660,9 +660,9 @@ def add_whitespace_placeholder_to_headings(soup: BeautifulSoup): HEADER_TAGS = ["h1", "h2", "h3", "h4", "h5", "h6"] headers = soup.find_all(HEADER_TAGS) main_headers = r"\d+(?:\.\d+){0,2}" main_headers = r"\d+(?:\.\d+){0,5}" annex_headers = r"Annex\s[A-Z](?:\s(?:\(normative\)|\(informative\)))?:" annex_subheaders = r"[A-Z](?:\.\d{1,2})+" annex_subheaders = r"[A-Z](?:\.\d{1,5})+" tabbed_header_regex = rf"^({main_headers}|{annex_subheaders})\s" # The headers that should have a tab offset newline_header_regex = rf"^({annex_headers})\s*" Loading Loading
md_to_docx_converter/src/to_docx/preprocessing.py +2 −2 Original line number Diff line number Diff line Loading @@ -660,9 +660,9 @@ def add_whitespace_placeholder_to_headings(soup: BeautifulSoup): HEADER_TAGS = ["h1", "h2", "h3", "h4", "h5", "h6"] headers = soup.find_all(HEADER_TAGS) main_headers = r"\d+(?:\.\d+){0,2}" main_headers = r"\d+(?:\.\d+){0,5}" annex_headers = r"Annex\s[A-Z](?:\s(?:\(normative\)|\(informative\)))?:" annex_subheaders = r"[A-Z](?:\.\d{1,2})+" annex_subheaders = r"[A-Z](?:\.\d{1,5})+" tabbed_header_regex = rf"^({main_headers}|{annex_subheaders})\s" # The headers that should have a tab offset newline_header_regex = rf"^({annex_headers})\s*" Loading