[Pywikipedia-l] SVN: [6296] trunk/pywikipedia/replace.py

siebrand at svn.wikimedia.org siebrand at svn.wikimedia.org
Tue Jan 27 08:45:11 UTC 2009


Revision: 6296
Author:   siebrand
Date:     2009-01-27 08:45:11 +0000 (Tue, 27 Jan 2009)

Log Message:
-----------
[ 2485193 ] replace.py: Ignore variations in newlines on new/old. Contributed by Murph

Modified Paths:
--------------
    trunk/pywikipedia/replace.py

Modified: trunk/pywikipedia/replace.py
===================================================================
--- trunk/pywikipedia/replace.py	2009-01-27 08:18:46 UTC (rev 6295)
+++ trunk/pywikipedia/replace.py	2009-01-27 08:45:11 UTC (rev 6296)
@@ -371,7 +371,7 @@
                         % page.aslink())
                     break
                 new_text = self.doReplacements(new_text)
-                if new_text == original_text:
+                if new_text.strip().replace('\r\n', '\n') == original_text.strip().replace('\r\n', '\n'):
                     wikipedia.output('No changes were necessary in %s'
                                      % page.aslink())
                     break





More information about the Pywikipedia-l mailing list