Revision: 5388 Author: wikipedian Date: 2008-05-16 20:12:04 +0000 (Fri, 16 May 2008)
Log Message: ----------- Simplified a loop in replaceExcept(). As a side effect, you can now use replace.py to post text into empty pages by running: python replace.py -regex ^$ New_Text -start:A
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2008-05-16 18:15:36 UTC (rev 5387) +++ trunk/pywikipedia/wikipedia.py 2008-05-16 20:12:04 UTC (rev 5388) @@ -3101,7 +3101,7 @@ dontTouchRegexes.append(exc) index = 0 markerpos = len(text) - while index < len(text): + while True: match = old.search(text, index) if not match: # nothing left to replace