Trim whitespace at end of entry

* undone/main.scm (add): Trim whitespace from the end of whatever text
  gets filled in.
  (default): Place newline after each item.
This commit is contained in:
Tom Willemsen 2012-08-17 01:56:25 +02:00
parent 3a132e8040
commit 4124f07fa9

View file

@ -125,7 +125,7 @@
(append todo-list
(list
(append
`((content . ,(read-delimited "")))
`((content . ,(string-trim-right (read-delimited ""))))
(map (lambda (arg)
(let* ((pair (string-split arg #\=))
(var (string->symbol (car pair)))
@ -139,7 +139,7 @@
(define-view default
"Default todo-list view, show only the title."
"~a" content)
"~a~%" content)
(define (view args)
"Show a list of todo items."