Commits

Steve Losh committed 2693d5c

Remove extra padding in task files to aid in merging.

  • Participants
  • Parent commits e48c6ca
  • Tags v1.1.0

Comments (0)

Files changed (3)

     """Parse a list of tasks into tasklines suitable for writing."""
 
     tasklines = []
-    tlen = max(map(lambda t: len(t['text']), tasks)) if tasks else 0
 
     for task in tasks:
         meta = [m for m in task.items() if m[0] != 'text']
         meta_str = ', '.join('%s:%s' % m for m in meta)
-        tasklines.append('%s | %s\n' % (task['text'].ljust(tlen), meta_str))
+        tasklines.append('%s | %s\n' % (task['text'], meta_str))
 
     return tasklines
 

File tests/finished.t

   $ xt -f 7
   $ cat .test.done
   Sample four. | id:1dd56b09a9ca0fdf4f2a8c0959a298098eb8f7de
-  Sample two.  | id:7a4dc18c23f3b890602da09da1690ccfb4c87bd1
+  Sample two. | id:7a4dc18c23f3b890602da09da1690ccfb4c87bd1
   $ xt -f 3
   $ cat .test.done
   Sample four. | id:1dd56b09a9ca0fdf4f2a8c0959a298098eb8f7de
-  Sample one.  | id:329950673481cb1c19102c982bfc63e745ab4a6f
-  Sample two.  | id:7a4dc18c23f3b890602da09da1690ccfb4c87bd1
+  Sample one. | id:329950673481cb1c19102c982bfc63e745ab4a6f
+  Sample two. | id:7a4dc18c23f3b890602da09da1690ccfb4c87bd1
   $ xt -f 9
   $ cat .test.done
-  Sample four.  | id:1dd56b09a9ca0fdf4f2a8c0959a298098eb8f7de
-  Sample one.   | id:329950673481cb1c19102c982bfc63e745ab4a6f
-  Sample two.   | id:7a4dc18c23f3b890602da09da1690ccfb4c87bd1
+  Sample four. | id:1dd56b09a9ca0fdf4f2a8c0959a298098eb8f7de
+  Sample one. | id:329950673481cb1c19102c982bfc63e745ab4a6f
+  Sample two. | id:7a4dc18c23f3b890602da09da1690ccfb4c87bd1
   Sample three. | id:90cf0626ca134e0aa6453b3562dc1c8bb34f1568
 

File tests/padding.t

   5 - Short.
   $ cat test
   Longcat is long. | id:4c623ab4df5cc1a10d32558768c2c21bddf2c053
-  Short.           | id:5a7a65db2caa6313a70ceb75b1bd806f7879f6b7
+  Short. | id:5a7a65db2caa6313a70ceb75b1bd806f7879f6b7
   $ cat >> test << EOF
   > Long one. | id: long1
   > Very long two. | id: long2
   long2 - Very long two.
   $ cat test
   Longcat is long. | id:4c623ab4df5cc1a10d32558768c2c21bddf2c053
-  Long one.        | id:long1
-  Very long two.   | id:long2
+  Long one. | id:long1
+  Very long two. | id:long2