Skip to content

Commit

Permalink
fixup: fix parser to ignore badges
Browse files Browse the repository at this point in the history
Signed-off-by: Todd Baert <toddbaert@gmail.com>
  • Loading branch information
toddbaert committed Jan 10, 2023
1 parent 1d4cb5d commit 3c1e6bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/specification_parser/specification_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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<level>#+)(?P<headline>[^\n]+)(?P<rest>[^#]*)', re.MULTILINE)
content_finder = re.compile(r'^(?P<level>####+)(?P<headline>[^\n]+)\n+?.*?\n+?(?P<rest>>\s[^#?]*)', re.MULTILINE)
parsed = content_finder.findall(markdown_file.read())
return parsed_content_to_heirarchy(parsed)

Expand Down

0 comments on commit 3c1e6bc

Please sign in to comment.