mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
doc: wikiparser: Handle processing instructions
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
f628a3ed0b
commit
40f853278b
@ -3,11 +3,11 @@
|
|||||||
MoinMoin wiki parser
|
MoinMoin wiki parser
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import logging
|
||||||
|
import re
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from xml.sax.saxutils import escape
|
from xml.sax.saxutils import escape
|
||||||
import logging
|
|
||||||
import re
|
|
||||||
|
|
||||||
ICONS_DIR = 'icons'
|
ICONS_DIR = 'icons'
|
||||||
|
|
||||||
@ -1216,6 +1216,12 @@ PlainText('dialog.')])])])]
|
|||||||
if line.strip().startswith('##'):
|
if line.strip().startswith('##'):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# Processing instructions, not rendered
|
||||||
|
if line.strip() and \
|
||||||
|
line.strip().split()[0] in ('#format', '#redirect', '#refresh',
|
||||||
|
'#pragma', '#deprecated', '#language'):
|
||||||
|
continue
|
||||||
|
|
||||||
# Table of Contents
|
# Table of Contents
|
||||||
match = re.match(r'<<TableOfContents\((\d*)\)>>', line)
|
match = re.match(r'<<TableOfContents\((\d*)\)>>', line)
|
||||||
if match:
|
if match:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user