Commit 06b91ecb authored by Marco Cavalli's avatar Marco Cavalli
Browse files

fix: prevent override of first note and example in a clause

parent 8d624ec0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -450,14 +450,14 @@ def auto_number_content(
            new_line, new_heading = auto_number_heading(new_line)
            previous_heading = new_heading

            if example_counter >= 1 and first_example_line_index != -1:
            if example_counter >= 1 and first_example_line_index != -1 and "EXAMPLE" not in lines[first_example_line_index]:
                lines[
                    first_example_line_index
                ] += f" EXAMPLE{' 1' if example_counter > 1 else ''}:"
            example_counter = 0
            first_example_line_index = -1

            if note_counter >= 1 and first_note_line_index != -1:
            if note_counter >= 1 and first_note_line_index != -1 and "NOTE" not in lines[first_note_line_index]:
                lines[
                    first_note_line_index
                ] += f" NOTE{' 1' if note_counter > 1 else ''}:"