From e5c51e9bb403a9d207a089dc50ed26a61b56b148 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 24 Aug 2020 15:29:39 -0700 Subject: [PATCH] doc: wikiparser: Handle table of contents macro without parenthesis Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- doc/scripts/wikiparser.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/scripts/wikiparser.py b/doc/scripts/wikiparser.py index db7a2cf46..95ec1086f 100644 --- a/doc/scripts/wikiparser.py +++ b/doc/scripts/wikiparser.py @@ -832,6 +832,8 @@ def parse_wiki(text, context=None, begin_marker=None, end_marker=None): >>> parse_wiki('') [] + >>> parse_wiki('<>') + [TableOfContents()] >>> parse_wiki('<>') [TableOfContents()] >>> parse_wiki('<>') @@ -1240,7 +1242,7 @@ PlainText('dialog.')])])])] continue # Table of Contents - match = re.match(r'<>', line) + match = re.match(r'<>', line) if match: level = match.group(1) if level: