doc: wikiparser: Place anchors inside paragraphs

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2020-08-25 23:00:04 -07:00 committed by James Valleroy
parent f3dee93a61
commit cafbdaab19
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -1053,7 +1053,7 @@ TableItem([Paragraph([PlainText('3 ')])])])])]
[Category('FreedomBox')]
>>> parse_wiki('<<Anchor(gettinghelp)>>')
[Anchor('gettinghelp')]
[Paragraph([Anchor('gettinghelp')])]
>>> parse_wiki('<<Include(FreedomBox/Portal)>>')
[Include('FreedomBox/Portal')]
@ -1521,7 +1521,7 @@ PlainText(' dialog. ')])])])]
match = re.match(r'<<Anchor\((.+)\)>>', line)
if match:
content = match.group(1)
elements.append(Anchor(content))
elements.append(Paragraph([Anchor(content)]))
continue
# Include