Commit 7866cb69 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Fix to allow more text in the Clause citations, i.e. [Clause X.Y.Z My text]

parent bc4356a7
Loading
Loading
Loading
Loading
+2 −1
Changes for generateBaseline/postprocessing.py: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -3376,7 +3376,8 @@ def update_references_style(docx_input, docx_output):
    # Pattern to match internal references: [i.1] or [1] or [i.12] or [12]
    reference_pattern = re.compile(r'^\[(i\.)?\d+\]$', re.IGNORECASE)
    # Clause 6.2.3, Clause A, or Clause A.1. Figure 6-1 or Figure 6.2-1, Table 7.1-1.
    clause_pattern = re.compile(r'^(?:clauses?|annex(?:es)?)\s+((?:[A-Z]|\d+)(?:\.\d+)*)$', re.IGNORECASE)
    # Some text is allowed after the clause citation, such as "Clause 6.2.3 option 1"
    clause_pattern = re.compile(r'^(?:clauses?|annex(?:es)?)\s+((?:[A-Z]|\d+)(?:\.\d+)*)(?:\s+.*)?$', re.IGNORECASE)
    figure_pattern = re.compile(r'^figures?\s+\d+(?:\.\d+)*-\d+$', re.IGNORECASE)
    table_pattern = re.compile(r'^tables?\s+\d+(?:\.\d+)*-\d+$', re.IGNORECASE)