Author: sebastien.lelong
Date: Sun Nov 23 23:00:54 2008
New Revision: 596
Modified:
trunk/tools/jallib.py
Log:
try to fix added new line when reindenting file
Modified: trunk/tools/jallib.py
==============================================================================
--- trunk/tools/jallib.py (original)
+++ trunk/tools/jallib.py Sun Nov 23 23:00:54 2008
@@ -947,7 +947,10 @@
def reindent_file(filename):
data = file(filename).read()
- lines = re.split("\n|\r\n",data)
+ # dont keep last one, because since it's ended with a \n,
+ # it will appear as an element in lines, resulting in a
+ # new line at the end of file. Is this true ?...
+ lines = re.split("\n|\r\n",data)[:-1]
level = 0
content = []
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jallib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/jallib?hl=en
-~----------~----~----~----~------~----~------~--~---