fix: AsciiDoc header identification (#1562) (#1563)

Fix regular expression to identify header lines in AsciiDoc avoiding to
match defined blocks.

Signed-off-by: Marco Fargetta <mfargett@redhat.com>
Signed-off-by: Nikhil Khandelwal <nikhil.khandelwal3@ibm.com>
This commit is contained in:
Marco Fargetta 2025-05-13 11:17:26 +02:00 committed by Nikhil Khandelwal
parent e64fd66341
commit 8e51785216

View File

@ -287,7 +287,7 @@ class AsciiDocBackend(DeclarativeDocumentBackend):
# ========= Section headers
def _is_section_header(self, line):
return re.match(r"^==+", line)
return re.match(r"^==+\s+", line)
def _parse_section_header(self, line):
match = re.match(r"^(=+)\s+(.*)", line)