From 3c1e6bc5d099254aeaa41a778bebb0849a12e79c Mon Sep 17 00:00:00 2001 From: Todd Baert Date: Tue, 10 Jan 2023 15:10:38 -0500 Subject: [PATCH] fixup: fix parser to ignore badges Signed-off-by: Todd Baert --- tools/specification_parser/specification_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/specification_parser/specification_parser.py b/tools/specification_parser/specification_parser.py index 27ba8c8e..1cb51174 100644 --- a/tools/specification_parser/specification_parser.py +++ b/tools/specification_parser/specification_parser.py @@ -181,7 +181,7 @@ def content_tree_to_spec(ct): def parse(markdown_file_path): with open(markdown_file_path, "r") as markdown_file: - content_finder = re.compile(r'^(?P#+)(?P[^\n]+)(?P[^#]*)', re.MULTILINE) + content_finder = re.compile(r'^(?P####+)(?P[^\n]+)\n+?.*?\n+?(?P>\s[^#?]*)', re.MULTILINE) parsed = content_finder.findall(markdown_file.read()) return parsed_content_to_heirarchy(parsed)