diff --git a/wikicontent.py b/wikicontent.py index 7c7c3e7..f1d7fb3 100644 --- a/wikicontent.py +++ b/wikicontent.py @@ -50,7 +50,7 @@ def convert_pagecontent(title, content): # wrap the "magic" marker tag <__mw_nowiki> around , as # as mwlib just discards it otherwise and we can't detect it within the parser. # We keep the inner so the mwlib parser still skips that content - content = re.sub(r".+", lambda e: "<__mw_nowiki>"+e.group(0)+"", content) + content = re.sub(r".+?", lambda e: "<__mw_nowiki>"+e.group(0)+"", content) root = uparser.parseString(title, content) # create parse tree return convert(root, False)