mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-27 04:24:45 +00:00
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:
parent
e64fd66341
commit
8e51785216
@ -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