fix: AsciiDoc header identification (#1562)

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-09 19:25:04 +02:00
parent 776e7ecf9a
commit 7cd1d59e0e

View File

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