Revision: 5394 Author: nicdumz Date: 2008-05-18 10:42:14 +0000 (Sun, 18 May 2008)
Log Message: ----------- Bugfix for #1966401 "Category.py can not interpret miss-capitalised category tag.", making the category detection case insensitive.
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2008-05-17 14:35:02 UTC (rev 5393) +++ trunk/pywikipedia/wikipedia.py 2008-05-18 10:42:14 UTC (rev 5394) @@ -3370,7 +3370,7 @@ # and HTML comments text = removeDisabledParts(text) catNamespace = '|'.join(site.category_namespaces()) - R = re.compile(r'[[\s*(?P<namespace>%s)\s*:\s*(?P<catName>.+?)(?:|(?P<sortKey>.+?))?\s*]]' % catNamespace) + R = re.compile(r'[[\s*(?P<namespace>%s)\s*:\s*(?P<catName>.+?)(?:|(?P<sortKey>.+?))?\s*]]' % catNamespace, re.I) for match in R.finditer(text): cat = catlib.Category(site, '%s:%s' % (match.group('namespace'), match.group('catName')), sortKey = match.group('sortKey')) result.append(cat)