From 7cd1d59e0ec0467370da8b7bc5401319c94e4745 Mon Sep 17 00:00:00 2001 From: Marco Fargetta Date: Fri, 9 May 2025 19:25:04 +0200 Subject: [PATCH] fix: AsciiDoc header identification (#1562) Fix regular expression to identify header lines in AsciiDoc avoiding to match defined blocks. Signed-off-by: Marco Fargetta --- docling/backend/asciidoc_backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docling/backend/asciidoc_backend.py b/docling/backend/asciidoc_backend.py index 3c418103..5328e8dd 100644 --- a/docling/backend/asciidoc_backend.py +++ b/docling/backend/asciidoc_backend.py @@ -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)