Index: src/crontab.py
===================================================================
RCS file: /cvs/gnome/gnome-schedule/src/crontab.py,v
retrieving revision 1.91
diff -u -r1.91 crontab.py
--- src/crontab.py	26 Dec 2005 12:51:54 -0000	1.91
+++ src/crontab.py	24 May 2006 00:57:28 -0000
@@ -35,7 +35,7 @@
 		self.set_rights(user,uid,gid)
 		
 		self.nooutputtag = ">/dev/null 2>&1"
-		self.crontabRecordRegex = re.compile('([^\s]+)\s([^\s]+)\s([^\s]+)\s([^\s]+)\s([^\s]+)\s([^#\n$]*)(\s#\s([^\n$]*)|$)')
+		self.crontabRecordRegex = re.compile('^\s*([^\s]+)\s+([^\s]+)\s+([^\s]+)\s+([^\s]+)\s+([^\s]+)\s+(([^\n]*(?= # ))|[^\n]*$)( # ([^\n]*)$|$)')
 
 		self.timeranges = { 
 			"minute"   : range(0,60), 
@@ -256,6 +256,7 @@
 	
 	#get info out of task line
 	def parse (self, line):
+		line = line.strip()
 		if len (line) > 1 and line[0] != '#':
 			"""
 						   min        hour      day      month      wday     command   comment/title-icon or end
@@ -277,9 +278,9 @@
 					
 					#title is in comment of the task
 					title = None
-					if m.groups ()[7] != None:
+					if m.groups ()[8] != None:
 						# TODO: check if works
-						lastpiece = m.groups ()[7]
+						lastpiece = m.groups ()[8]
 						keep = lastpiece.split (", ")
 						title = keep[0]
 						if len (keep) > 1:
