From 29ef2a66823fba39f1af8542eebcb397d667fa82 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Sat, 6 Oct 2012 14:34:51 -0400 Subject: [PATCH] Propogate fix from b447e7bfc16322fc296d45be1a7f5e6769a53498 --- mwparserfromhell/parser/tokenizer.c | 3 ++- mwparserfromhell/parser/tokenizer.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mwparserfromhell/parser/tokenizer.c b/mwparserfromhell/parser/tokenizer.c index 73033e4..5117e9c 100644 --- a/mwparserfromhell/parser/tokenizer.c +++ b/mwparserfromhell/parser/tokenizer.c @@ -1273,7 +1273,8 @@ Tokenizer_parse(Tokenizer* self, Py_ssize_t context) PyObject *this; Py_UNICODE this_data, next, next_next, last; 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; Tokenizer_push(self, context); diff --git a/mwparserfromhell/parser/tokenizer.py b/mwparserfromhell/parser/tokenizer.py index 9cd6290..5b0e976 100644 --- a/mwparserfromhell/parser/tokenizer.py +++ b/mwparserfromhell/parser/tokenizer.py @@ -431,7 +431,8 @@ class Tokenizer(object): continue if this is self.END: fail = (contexts.TEMPLATE | contexts.ARGUMENT | - contexts.HEADING | contexts.COMMENT) + contexts.WIKILINK | contexts.HEADING | + contexts.COMMENT) if self._context & contexts.TEMPLATE_PARAM_KEY: self._pop() if self._context & fail: