Revision: 4231 Author: wikipedian Date: 2007-09-11 12:09:57 +0000 (Tue, 11 Sep 2007)
Log Message: ----------- fixed section header regex
Modified Paths: -------------- trunk/pywikipedia/noreferences.py
Modified: trunk/pywikipedia/noreferences.py =================================================================== --- trunk/pywikipedia/noreferences.py 2007-09-11 12:08:02 UTC (rev 4230) +++ trunk/pywikipedia/noreferences.py 2007-09-11 12:09:57 UTC (rev 4231) @@ -127,7 +127,7 @@ wikipedia.output(u'No changes necessary: no ref tags found.') return False elif self.referencesR.search(oldTextCleaned): - wikipedia.output(u'No changes necessary: references tags found.') + wikipedia.output(u'No changes necessary: references tag found.') return False else: for template in page.templates(): @@ -147,7 +147,7 @@ def treat(self, page): oldText = page.get() for section in wikipedia.translate(wikipedia.getSite(), placeBeforeSection): - sectionR = re.compile(r'\r\n=+ +%s +=+' % section) + sectionR = re.compile(r'\r\n=+ *%s *=+' % section) match = sectionR.search(oldText) if match: wikipedia.output(u'Adding references section...\n')