Browse Source

Propogate fix from b447e7bfc1

tags/v0.2
Ben Kurtovic 12 years ago
parent
commit
29ef2a6682
2 changed files with 4 additions and 2 deletions
  1. +2
    -1
      mwparserfromhell/parser/tokenizer.c
  2. +2
    -1
      mwparserfromhell/parser/tokenizer.py

+ 2
- 1
mwparserfromhell/parser/tokenizer.c View File

@@ -1273,7 +1273,8 @@ Tokenizer_parse(Tokenizer* self, Py_ssize_t context)
PyObject *this; PyObject *this;
Py_UNICODE this_data, next, next_next, last; Py_UNICODE this_data, next, next_next, last;
Py_ssize_t this_context; Py_ssize_t this_context;
Py_ssize_t fail_contexts = LC_TEMPLATE | LC_ARGUMENT | LC_HEADING | LC_COMMENT;
Py_ssize_t fail_contexts = (
LC_TEMPLATE | LC_ARGUMENT | LC_WIKILINK | LC_HEADING | LC_COMMENT);
int is_marker, i; int is_marker, i;


Tokenizer_push(self, context); Tokenizer_push(self, context);


+ 2
- 1
mwparserfromhell/parser/tokenizer.py View File

@@ -431,7 +431,8 @@ class Tokenizer(object):
continue continue
if this is self.END: if this is self.END:
fail = (contexts.TEMPLATE | contexts.ARGUMENT | fail = (contexts.TEMPLATE | contexts.ARGUMENT |
contexts.HEADING | contexts.COMMENT)
contexts.WIKILINK | contexts.HEADING |
contexts.COMMENT)
if self._context & contexts.TEMPLATE_PARAM_KEY: if self._context & contexts.TEMPLATE_PARAM_KEY:
self._pop() self._pop()
if self._context & fail: if self._context & fail:


Loading…
Cancel
Save