mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-27 04:24:45 +00:00
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:
parent
776e7ecf9a
commit
7cd1d59e0e
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user