]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/robots/robots.factor
factor: trim using lists
[factor.git] / extra / robots / robots.factor
index defb520f9c4cb5c3bfe1eac0a331b6559c72bef4..6e61420d43ec9f3bf7f0700d9b7792802d41f6d2 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2009 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays assocs calendar.parser combinators
-combinators.short-circuit fry globs http.client kernel math.parser
+combinators.short-circuit globs http.client kernel math.parser
 namespaces present regexp regexp.combinators sequences splitting
 splitting.monotonic unicode urls ;
 IN: robots
@@ -33,9 +33,9 @@ visit-time request-rate crawl-delay unknowns ;
 
 : normalize-robots.txt ( string -- sitemaps seq )
     split-lines
-    [ [ blank? ] trim ] map
+    [ [ unicode:blank? ] trim ] map
     [ "#" head? ] reject harvest
-    [ ":" split1 [ [ blank? ] trim ] bi@ [ >lower ] dip  ] { } map>assoc
+    [ ":" split1 [ [ unicode:blank? ] trim ] bi@ [ >lower ] dip  ] { } map>assoc
     [ first "sitemap" = ] partition [ values ] dip
     [
         {