Skip to content

Commit

Permalink
Merge pull request #52 from murawaki/unconventional-redirects
Browse files Browse the repository at this point in the history
accept unconventional redirects
  • Loading branch information
ckepper committed Jun 22, 2015
2 parents c41330f + d8d540e commit 4cd8e1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mwlib/nshandling.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def get_redirect_matcher(siteinfo, handler=None):
for m in magicwords:
if m['name'] == 'redirect':
redirect_str = "(?:" + "|".join([re.escape(x) for x in m['aliases']]) + ")"
redirect_rex = re.compile(r'^%s:?\s*?\[\[(?P<redirect>.*?)\]\]' % redirect_str, re.IGNORECASE)
redirect_rex = re.compile(r'^[ \t\n\r\0\x0B]*%s\s*:?\s*?\[\[(?P<redirect>.*?)\]\]' % redirect_str, re.IGNORECASE)

if handler is None:
handler = nshandler(siteinfo)
Expand Down

0 comments on commit 4cd8e1c

Please sign in to comment.