Revision: 5338 Author: nicdumz Date: 2008-05-08 19:17:04 +0000 (Thu, 08 May 2008)
Log Message: ----------- Well this is a standard join function :)
Modified Paths: -------------- trunk/pywikipedia/noreferences.py
Modified: trunk/pywikipedia/noreferences.py =================================================================== --- trunk/pywikipedia/noreferences.py 2008-05-08 19:03:33 UTC (rev 5337) +++ trunk/pywikipedia/noreferences.py 2008-05-08 19:17:04 UTC (rev 5338) @@ -238,12 +238,7 @@ return False else: if self.referencesTemplates: - templateR ='' - part = '{{(' - for template in self.referencesTemplates: - templateR += part + template - part = '|' - templateR+=')' + templateR = u'{{(' + u'|'.join(self.referencesTemplates) + ')' if re.search(templateR, oldTextCleaned, re.IGNORECASE): if verbose: wikipedia.output(u'No changes necessary: references template found.')