[Pywikipedia-l] SVN: [4873] trunk/pywikipedia/wikipedia.py

rotem at svn.wikimedia.org rotem at svn.wikimedia.org
Sun Jan 13 17:52:50 UTC 2008


Revision: 4873
Author:   rotem
Date:     2008-01-13 17:52:50 +0000 (Sun, 13 Jan 2008)

Log Message:
-----------
Don't care about newlines type when checking if a cosmetic changes comment should be added, as they are converted anyway.

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

Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py	2008-01-13 17:39:19 UTC (rev 4872)
+++ trunk/pywikipedia/wikipedia.py	2008-01-13 17:52:50 UTC (rev 4873)
@@ -1172,7 +1172,7 @@
                 import cosmetic_changes
                 ccToolkit = cosmetic_changes.CosmeticChangesToolkit(self.site())
                 newtext = ccToolkit.change(newtext)
-                if comment and old.strip() != newtext.strip():
+                if comment and old.strip().replace('\r\n', '\n') != newtext.strip().replace('\r\n', '\n'):
                     comment += translate(self.site(), cosmetic_changes.msg_append)
 
         if watchArticle == None:





More information about the Pywikipedia-l mailing list