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>
This commit is contained in:
Marco Fargetta
2025-05-13 11:17:26 +02:00
committed by GitHub
parent 8baa85a49d
commit 4046d0b2f3

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)