We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a3ac623 commit 2cc9a4dCopy full SHA for 2cc9a4d
1 file changed
wikitexthtml/render/preprocess.py
@@ -18,8 +18,9 @@
18
ONLYINCLUDE_PATTERN = regex.compile(r"<onlyinclude>([\s\S]*?)(?></onlyinclude>|\Z)")
19
PRE_PATTERN = regex.compile(r"<pre>([\s\S]*?)(?></pre>|\Z)")
20
SYNTAXHIGHLIGHT_PATTERN = regex.compile(
21
- r"<syntaxhighlight( lang=\")?(?P<lang>[a-zA-z]+)?\"?"
22
- r"(?P<line> line(?P<lineStart> \d*)?)?>(?P<code>[\s\S]*?)(?></syntaxhighlight>|\Z)"
+ r"<syntaxhighlight( lang=\"(?P<lang>[^\"]+)\")?"
+ r"(?P<line> line( start=\"(?P<lineStart>\d+)\")?)?>"
23
+ r"(?P<code>[\s\S]*?)(</syntaxhighlight>|\Z)"
24
)
25
26
0 commit comments