This website works better with JavaScript.
Home
Help
Sign In
ben
/
mwparserfromhell
mirror of
https://github.com/earwig/mwparserfromhell
Watch
1
Star
1
Fork
0
Code
Releases
24
Activity
Browse Source
Fix an assumption regarding templates mistaken as arguments.
tags/v0.1
Ben Kurtovic
12 years ago
parent
70cf46ef0d
commit
814ce9f290
1 changed files
with
2 additions
and
5 deletions
Unified View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-5
mwparserfromhell/parser/tokenizer.py
+ 2
- 5
mwparserfromhell/parser/tokenizer.py
View File
@@ -167,16 +167,13 @@ class Tokenizer(object):
break
break
try:
try:
self._parse_argument()
self._parse_argument()
braces -= 3
except BadRoute:
except BadRoute:
try:
try:
self._parse_template()
self._parse_template()
braces -= 2
except BadRoute:
except BadRoute:
return self._write_text_then_stack("{" * braces)
return self._write_text_then_stack("{" * braces)
stack = self._pop()
self._write_text("{")
self._push()
self._write_all(stack)
braces -= 3
if braces:
if braces:
self._head += 1
self._head += 1
Write
Preview
Loading…
Cancel
Save