mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-04-29 10:10:19 +00:00
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:
parent
f3dee93a61
commit
cafbdaab19
@ -1053,7 +1053,7 @@ TableItem([Paragraph([PlainText('3 ')])])])])]
|
|||||||
[Category('FreedomBox')]
|
[Category('FreedomBox')]
|
||||||
|
|
||||||
>>> parse_wiki('<<Anchor(gettinghelp)>>')
|
>>> parse_wiki('<<Anchor(gettinghelp)>>')
|
||||||
[Anchor('gettinghelp')]
|
[Paragraph([Anchor('gettinghelp')])]
|
||||||
|
|
||||||
>>> parse_wiki('<<Include(FreedomBox/Portal)>>')
|
>>> parse_wiki('<<Include(FreedomBox/Portal)>>')
|
||||||
[Include('FreedomBox/Portal')]
|
[Include('FreedomBox/Portal')]
|
||||||
@ -1521,7 +1521,7 @@ PlainText(' dialog. ')])])])]
|
|||||||
match = re.match(r'<<Anchor\((.+)\)>>', line)
|
match = re.match(r'<<Anchor\((.+)\)>>', line)
|
||||||
if match:
|
if match:
|
||||||
content = match.group(1)
|
content = match.group(1)
|
||||||
elements.append(Anchor(content))
|
elements.append(Paragraph([Anchor(content)]))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Include
|
# Include
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user