import: Drop empty list items.

* guix/import/cran.scm (listify): Remove empty strings from result list.
master
Ricardo Wurmus 2015-12-16 14:29:38 +01:00
parent 0cb5bc2cff
commit be036757bd
1 changed files with 6 additions and 3 deletions

View File

@ -128,9 +128,12 @@ empty list when the FIELD cannot be found."
#f "( *\\([^\\)]+\\)) *"
value 'pre 'post)
#\,)))
;; When there is whitespace inside of items it is probably because
;; this was not an actual list to begin with.
(remove (cut string-any char-set:whitespace <>)
(remove (lambda (item)
(or (string-null? item)
;; When there is whitespace inside of items it is
;; probably because this was not an actual list to
;; begin with.
(string-any char-set:whitespace item)))
(map string-trim-both items))))))
(define (beautify-description description)