guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/03: import: Drop empty list items.


From: Ricardo Wurmus
Subject: 02/03: import: Drop empty list items.
Date: Mon, 21 Dec 2015 14:25:28 +0000

rekado pushed a commit to branch master
in repository guix.

commit be036757bdd0819aa16ea386a7283d6bf315cad4
Author: Ricardo Wurmus <address@hidden>
Date:   Wed Dec 16 14:29:38 2015 +0100

    import: Drop empty list items.
    
    * guix/import/cran.scm (listify): Remove empty strings from result list.
---
 guix/import/cran.scm |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index 845ecb5..45c679c 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]