From 538f49365be0d9fc37b25c5c1fc3def5959497a9 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Mon, 20 Dec 2021 17:26:05 -0600 Subject: [PATCH] factor: qualifying blank?, random fixes, renamed test file --- .../alien/libraries/finder/linux/linux.factor | 4 +-- basis/bootstrap/image/upload/upload.factor | 2 +- basis/colors/constants/constants.factor | 2 +- basis/csv/csv.factor | 6 ++-- basis/db/postgresql/lib/lib.factor | 4 +-- basis/documents/elements/elements.factor | 4 +-- basis/etc-hosts/etc-hosts.factor | 6 ++-- basis/help/apropos/apropos.factor | 2 +- basis/help/syntax/syntax.factor | 2 +- basis/html/templates/chloe/chloe-tests.factor | 8 +++--- basis/http/client/client-tests.factor | 3 +- basis/http/client/client.factor | 16 +++++------ basis/http/server/server-tests.factor | 3 +- .../io/launcher/windows/windows-tests.factor | 4 +-- .../{pipes-tests.factor => unix-tests.factor} | 4 +-- core/classes/mixin/mixin-tests.factor | 4 +-- core/classes/tuple/parser/parser-tests.factor | 2 +- core/parser/parser-tests.factor | 2 +- core/splitting/splitting-docs.factor | 2 +- extra/brainfuck/brainfuck-tests.factor | 2 +- extra/combinators/extras/extras-tests.factor | 4 +-- extra/modern/modern.factor | 12 ++++---- extra/pcre/ffi/ffi-tests.factor | 2 +- extra/robots/robots.factor | 4 +-- extra/sequences/extras/extras-tests.factor | 28 +++++++++---------- extra/splitting/extras/extras-tests.factor | 2 +- extra/text-analysis/text-analysis.factor | 4 +-- extra/txon/txon.factor | 4 +-- extra/webapps/help/help.factor | 2 +- 29 files changed, 73 insertions(+), 71 deletions(-) rename basis/io/pipes/unix/{pipes-tests.factor => unix-tests.factor} (71%) diff --git a/basis/alien/libraries/finder/linux/linux.factor b/basis/alien/libraries/finder/linux/linux.factor index e2dfc3965d..528e8771f9 100644 --- a/basis/alien/libraries/finder/linux/linux.factor +++ b/basis/alien/libraries/finder/linux/linux.factor @@ -16,10 +16,10 @@ CONSTANT: mach-map { : parse-ldconfig-lines ( string -- triple ) [ - "=>" split1 [ [ blank? ] trim ] bi@ + "=>" split1 [ [ unicode:blank? ] trim ] bi@ [ " " split1 [ "()" in? ] trim "," split - [ [ blank? ] trim ] map + [ [ unicode:blank? ] trim ] map [ ": Linux" swap subseq? ] reject ] dip 3array ] map ; diff --git a/basis/bootstrap/image/upload/upload.factor b/basis/bootstrap/image/upload/upload.factor index 63fb72e75c..90a887dde2 100644 --- a/basis/bootstrap/image/upload/upload.factor +++ b/basis/bootstrap/image/upload/upload.factor @@ -24,7 +24,7 @@ SYMBOL: build-images-destination image-path parent-directory [ { "git" "rev-parse" "--abbrev-ref" "HEAD" } utf8 stream-contents - [ blank? ] trim-tail + [ unicode:blank? ] trim-tail ] with-directory ; : git-branch-destination ( -- dest ) diff --git a/basis/colors/constants/constants.factor b/basis/colors/constants/constants.factor index 9be352ca47..0fc48c295b 100644 --- a/basis/colors/constants/constants.factor +++ b/basis/colors/constants/constants.factor @@ -9,7 +9,7 @@ IN: colors.constants : parse-color ( line -- name color ) first4 [ [ string>number 255 /f ] tri@ 1.0 ] dip - [ blank? ] trim-head H{ { CHAR: \s CHAR: - } } substitute swap ; + [ ascii:blank? ] trim-head H{ { CHAR: \s CHAR: - } } substitute swap ; : parse-colors ( lines -- assoc ) [ "!" head? ] reject diff --git a/basis/csv/csv.factor b/basis/csv/csv.factor index bf42a0a6eb..a4f6ab61dd 100644 --- a/basis/csv/csv.factor +++ b/basis/csv/csv.factor @@ -35,9 +35,9 @@ DEFER: quoted-field, : ?trim ( string -- string' ) dup length [ drop "" ] [ - over first-unsafe blank? - [ drop t ] [ 1 - over nth-unsafe blank? ] if - [ [ blank? ] trim ] when + over first-unsafe unicode:blank? + [ drop t ] [ 1 - over nth-unsafe unicode:blank? ] if + [ [ unicode:blank? ] trim ] when ] if-zero ; inline : continue-field ( delimiter stream field-seps seq -- sep/f field ) diff --git a/basis/db/postgresql/lib/lib.factor b/basis/db/postgresql/lib/lib.factor index f1c5d1e47c..ebbc85dec3 100644 --- a/basis/db/postgresql/lib/lib.factor +++ b/basis/db/postgresql/lib/lib.factor @@ -13,7 +13,7 @@ IN: db.postgresql.lib dup zero? [ drop f ] [ - PQresultErrorMessage [ blank? ] trim + PQresultErrorMessage [ ascii:blank? ] trim ] if ; : postgres-result-error ( res -- ) @@ -21,7 +21,7 @@ IN: db.postgresql.lib : (postgresql-error-message) ( handle -- str ) PQerrorMessage - "\n" split [ [ blank? ] trim ] map join-lines ; + "\n" split [ [ ascii:blank? ] trim ] map join-lines ; : postgresql-error-message ( -- str ) db-connection get handle>> (postgresql-error-message) ; diff --git a/basis/documents/elements/elements.factor b/basis/documents/elements/elements.factor index 853a6e1f14..4380167474 100644 --- a/basis/documents/elements/elements.factor +++ b/basis/documents/elements/elements.factor @@ -56,10 +56,10 @@ M: one-char-elt next-elt 2drop ; assoc ; MEMO: system-hosts ( -- hosts ) hosts-path parse-hosts ; diff --git a/basis/help/apropos/apropos.factor b/basis/help/apropos/apropos.factor index 1e79727130..49e9e2947f 100644 --- a/basis/help/apropos/apropos.factor +++ b/basis/help/apropos/apropos.factor @@ -89,4 +89,4 @@ M: apropos-search >link ; INSTANCE: apropos-search topic : apropos ( str -- ) - [ blank? ] trim print-topic ; + [ unicode:blank? ] trim print-topic ; diff --git a/basis/help/syntax/syntax.factor b/basis/help/syntax/syntax.factor index fc809078b0..0888be5850 100644 --- a/basis/help/syntax/syntax.factor +++ b/basis/help/syntax/syntax.factor @@ -79,7 +79,7 @@ IN: help.syntax ] produce nip ; : code-lines ( str -- seq ) - split-lines [ [ blank? ] trim ] map harvest ; + split-lines [ [ ascii:blank? ] trim ] map harvest ; : make-example ( str -- seq ) code-lines dup { [ array? ] [ length 1 > ] } 1&& [ diff --git a/basis/html/templates/chloe/chloe-tests.factor b/basis/html/templates/chloe/chloe-tests.factor index 2a205f929f..2fce6ac8da 100644 --- a/basis/html/templates/chloe/chloe-tests.factor +++ b/basis/html/templates/chloe/chloe-tests.factor @@ -97,7 +97,7 @@ M: link-test link-href drop "http://www.apple.com/foo&bar" ; { "
  • 1
  • 2
  • 3
" } [ [ "test7" test-template call-template - ] run-template [ blank? ] reject + ] run-template [ ascii:blank? ] reject ] unit-test TUPLE: person first-name last-name ; @@ -112,7 +112,7 @@ TUPLE: person first-name last-name ; { "
RBaxterUnknown
DougColeman
" } [ [ "test8" test-template call-template - ] run-template [ blank? ] reject + ] run-template [ ascii:blank? ] reject ] unit-test { } [ @@ -125,7 +125,7 @@ TUPLE: person first-name last-name ; { "
RBaxterUnknown
DougColeman
" } [ [ "test8" test-template call-template - ] run-template [ blank? ] reject + ] run-template [ ascii:blank? ] reject ] unit-test { } [ 1 "id" set-value ] unit-test @@ -153,7 +153,7 @@ TUPLE: person first-name last-name ; { "
RBaxterUnknown
" } [ [ "test11" test-template call-template - ] run-template [ blank? ] reject + ] run-template [ ascii:blank? ] reject ] unit-test { } [ diff --git a/basis/http/client/client-tests.factor b/basis/http/client/client-tests.factor index bb9c64fc47..d139ad7b6a 100644 --- a/basis/http/client/client-tests.factor +++ b/basis/http/client/client-tests.factor @@ -1,5 +1,6 @@ USING: accessors http http.client http.client.private -io.streams.string kernel namespaces sequences tools.test urls ; +io.streams.string kernel namespaces sequences splitting +tools.test urls ; IN: http.client.tests { "foo.txt" } [ "http://www.paulgraham.com/foo.txt" download-name ] unit-test diff --git a/basis/http/client/client.factor b/basis/http/client/client.factor index 14077dc623..b0bad5ff61 100644 --- a/basis/http/client/client.factor +++ b/basis/http/client/client.factor @@ -1,13 +1,13 @@ ! Copyright (C) 2005, 2010 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: accessors ascii assocs calendar combinators.short-circuit -destructors fry hashtables http http.client.post-data -http.parsers io io.crlf io.encodings io.encodings.ascii -io.encodings.binary io.encodings.iana io.encodings.string -io.files io.pathnames io.sockets io.sockets.secure io.timeouts -kernel locals math math.order math.parser mime.types namespaces -present sequences splitting urls vocabs.loader combinators -environment ; +USING: accessors ascii assocs calendar combinators +combinators.short-circuit destructors environment hashtables +http http.client.post-data http.parsers io io.crlf io.encodings +io.encodings.ascii io.encodings.binary io.encodings.iana +io.encodings.string io.files io.pathnames io.sockets +io.sockets.secure io.timeouts kernel math math.order math.parser +mime.types namespaces present sequences splitting urls +vocabs.loader ; IN: http.client ERROR: too-many-redirects ; diff --git a/basis/http/server/server-tests.factor b/basis/http/server/server-tests.factor index e6d4c21154..0cafe546e3 100644 --- a/basis/http/server/server-tests.factor +++ b/basis/http/server/server-tests.factor @@ -1,6 +1,7 @@ USING: accessors assocs continuations http http.server http.server.requests io.encodings.utf8 io.encodings.binary -io.streams.string kernel math peg sequences tools.test urls ; +io.streams.string kernel math peg sequences tools.test urls +splitting ; { t } [ [ \ + first ] [ <500> ] recover response? ] unit-test diff --git a/basis/io/launcher/windows/windows-tests.factor b/basis/io/launcher/windows/windows-tests.factor index 08d3bb6e2c..c0a3795798 100644 --- a/basis/io/launcher/windows/windows-tests.factor +++ b/basis/io/launcher/windows/windows-tests.factor @@ -97,7 +97,7 @@ SYMBOLS: out-path err-path ; console-vm-path "-run=listener" 2array >>command +closed+ >>stdin +stdout+ >>stderr - utf8 [ lines last ] with-process-reader + utf8 [ read-lines last ] with-process-reader ] unit-test : launcher-test-path ( -- str ) @@ -231,7 +231,7 @@ SYMBOLS: out-path err-path ; [ "IN: scratchpad " ] [ console-vm-path "-run=listener" 2array - ascii [ "USE: system 0 exit" print flush lines last ] with-process-stream + ascii [ "USE: system 0 exit" print flush read-lines last ] with-process-stream ] unit-test [ ] [ diff --git a/basis/io/pipes/unix/pipes-tests.factor b/basis/io/pipes/unix/unix-tests.factor similarity index 71% rename from basis/io/pipes/unix/pipes-tests.factor rename to basis/io/pipes/unix/unix-tests.factor index 7d5a660e6f..b0d1f36dbe 100644 --- a/basis/io/pipes/unix/pipes-tests.factor +++ b/basis/io/pipes/unix/unix-tests.factor @@ -1,5 +1,5 @@ USING: tools.test io.pipes io.pipes.unix io.encodings.utf8 -io.encodings io namespaces sequences ; +io.encodings io namespaces sequences splitting ; [ { 0 0 } ] [ { "ls" "grep ." } run-pipeline ] unit-test @@ -9,7 +9,7 @@ io.encodings io namespaces sequences ; [ input-stream [ utf8 ] change output-stream [ utf8 ] change - input-stream get lines reverse [ print ] each f + input-stream get stream-contents split-lines reverse [ print ] each f ] "grep ." } run-pipeline diff --git a/core/classes/mixin/mixin-tests.factor b/core/classes/mixin/mixin-tests.factor index 6ed0003f64..ec7c7fb4ec 100644 --- a/core/classes/mixin/mixin-tests.factor +++ b/core/classes/mixin/mixin-tests.factor @@ -1,7 +1,7 @@ USING: accessors arrays assocs classes classes.algebra classes.mixin classes.mixin.private classes.union.private compiler.units definitions -eval hashtables kernel math parser sequences source-files strings -tools.test vectors words ; +eval hashtables kernel math parser sequences source-files splitting +strings tools.test vectors words ; IN: classes.mixin.tests ! Test mixins diff --git a/core/classes/tuple/parser/parser-tests.factor b/core/classes/tuple/parser/parser-tests.factor index 2f948cd69f..35ad96c756 100644 --- a/core/classes/tuple/parser/parser-tests.factor +++ b/core/classes/tuple/parser/parser-tests.factor @@ -1,6 +1,6 @@ USING: accessors classes.tuple.parser lexer words classes sequences math kernel slots tools.test parser compiler.units -arrays classes.tuple eval multiline ; +arrays classes.tuple eval multiline splitting ; IN: classes.tuple.parser.tests TUPLE: test-1 ; diff --git a/core/parser/parser-tests.factor b/core/parser/parser-tests.factor index 53981abc1b..0cddf9026a 100644 --- a/core/parser/parser-tests.factor +++ b/core/parser/parser-tests.factor @@ -2,7 +2,7 @@ USING: accessors arrays assocs classes compiler.units effects eval generic grouping io.pathnames io.streams.string kernel lexer math multiline namespaces parser sequences sets source-files source-files.errors strings tools.crossref -tools.test vocabs vocabs.parser words words.symbol ; +tools.test vocabs vocabs.parser words words.symbol splitting ; IN: parser.tests { 1 [ 2 [ 3 ] 4 ] 5 } diff --git a/core/splitting/splitting-docs.factor b/core/splitting/splitting-docs.factor index 51bad5472b..f291372f7a 100644 --- a/core/splitting/splitting-docs.factor +++ b/core/splitting/splitting-docs.factor @@ -98,7 +98,7 @@ HELP: split-lines { $values { "seq" sequence } { "seq'" { $sequence string } } } { $description "Splits a string along line breaks." } { $examples - { $example "USING: prettyprint splitting ;" "\"Hello\\r\\nworld\\n\" lines ." "{ \"Hello\" \"world\" }" } + { $example "USING: prettyprint splitting ;" "\"Hello\\r\\nworld\\n\" split-lines ." "{ \"Hello\" \"world\" }" } } ; HELP: replace diff --git a/extra/brainfuck/brainfuck-tests.factor b/extra/brainfuck/brainfuck-tests.factor index 92de4d0267..3cf8fb882b 100644 --- a/extra/brainfuck/brainfuck-tests.factor +++ b/extra/brainfuck/brainfuck-tests.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license USING: brainfuck io.streams.string kernel literals math -math.parser math.ranges sequences tools.test ; +math.parser math.ranges sequences splitting tools.test ; [ "+" run-brainfuck ] must-infer [ "+" get-brainfuck ] must-infer diff --git a/extra/combinators/extras/extras-tests.factor b/extra/combinators/extras/extras-tests.factor index 5f1bdee9b7..2c63ea5cc6 100644 --- a/extra/combinators/extras/extras-tests.factor +++ b/extra/combinators/extras/extras-tests.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2013 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. USING: assocs combinators.extras io.files kernel math sequences -splitting tools.test ; +splitting tools.test splitting ; { "a b" } [ "a" "b" [ " " glue ] once ] unit-test @@ -66,5 +66,5 @@ splitting tools.test ; { f } [ H{ { 1 H{ { 3 4 } } } } { [ 1 of ] [ 2 of ] } chain ] unit-test { f } [ H{ { 2 H{ { 3 4 } } } } { [ 1 of ] [ 2 of ] } chain ] unit-test { 5 } [ - "hello factor!" { [ words ] [ first ] [ length ] } chain + "hello factor!" { [ split-words ] [ first ] [ length ] } chain ] unit-test diff --git a/extra/modern/modern.factor b/extra/modern/modern.factor index 4c86e8cf6c..e26d09e306 100644 --- a/extra/modern/modern.factor +++ b/extra/modern/modern.factor @@ -99,7 +99,7 @@ MACRO:: read-matched ( ch -- quot: ( n string tag -- n' string slice' ) ) n string tag 2over nth-check-eof { { [ dup openstreq member? ] [ ch read-double-matched ] } ! (=( or (( - { [ dup blank? ] [ + { [ dup unicode:blank? ] [ drop dup '[ _ matching-delimiter-string closestr1 2array members lex-until ] dip swap unclip-last 3array ] } ! ( foo ) [ drop [ slice-til-whitespace drop ] dip span-slices ] ! (foo) @@ -185,7 +185,7 @@ ERROR: unexpected-terminator n string slice ; [ "<" head? ] [ length 2 >= ] [ rest strict-upper? not ] - [ [ blank? ] any? not ] + [ [ unicode:blank? ] any? not ] [ "/>" tail? ] } 1&& ; @@ -195,7 +195,7 @@ ERROR: unexpected-terminator n string slice ; [ length 2 >= ] [ second CHAR: / = not ] [ rest strict-upper? not ] - [ [ blank? ] any? not ] + [ [ unicode:blank? ] any? not ] [ ">" tail? ] } 1&& ; @@ -205,7 +205,7 @@ ERROR: unexpected-terminator n string slice ; [ length 2 >= ] [ second CHAR: / = not ] [ rest strict-upper? not ] - [ [ blank? ] any? not ] + [ [ unicode:blank? ] any? not ] [ ">" tail? not ] } 1&& ; @@ -214,7 +214,7 @@ ERROR: unexpected-terminator n string slice ; [ "= ] [ rest strict-upper? not ] - [ [ blank? ] any? not ] + [ [ unicode:blank? ] any? not ] [ ">" tail? ] } 1&& ; @@ -451,7 +451,7 @@ ERROR: compound-syntax-disallowed n seq obj ; : check-compound-loop ( n/f string -- n/f string ? ) [ ] [ peek1-from ] [ previous-from ] 2tri - [ blank? ] bi@ or not ! no blanks between tokens + [ unicode:blank? ] bi@ or not ! no blanks between tokens pick and ; ! and a valid index : lex-factor ( n/f string/f -- n'/f string literal/f ) diff --git a/extra/pcre/ffi/ffi-tests.factor b/extra/pcre/ffi/ffi-tests.factor index d3b71c569f..bcea5cb7d3 100644 --- a/extra/pcre/ffi/ffi-tests.factor +++ b/extra/pcre/ffi/ffi-tests.factor @@ -1,4 +1,4 @@ USING: pcre.ffi sequences splitting tools.test ; IN: pcre.ffi.tests -{ 2 } [ pcre_version words length ] unit-test +{ 2 } [ pcre_version split-words length ] unit-test diff --git a/extra/robots/robots.factor b/extra/robots/robots.factor index defb520f9c..3df4f14ad4 100644 --- a/extra/robots/robots.factor +++ b/extra/robots/robots.factor @@ -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 [ { diff --git a/extra/sequences/extras/extras-tests.factor b/extra/sequences/extras/extras-tests.factor index f4ede8fb24..edad8b5a4d 100644 --- a/extra/sequences/extras/extras-tests.factor +++ b/extra/sequences/extras/extras-tests.factor @@ -54,13 +54,13 @@ tools.test vectors vocabs ; { { 2 4 6 } } [ { 1 2 3 4 5 6 } odd-indices ] unit-test { "a b c d e" } -[ "a b \t \n \r c d \n e " [ blank? ] " " compact ] unit-test +[ "a b \t \n \r c d \n e " [ ascii:blank? ] " " compact ] unit-test { " a b c d e " } -[ " a b c d e " [ blank? ] " " collapse ] unit-test +[ " a b c d e " [ ascii:blank? ] " " collapse ] unit-test { { "hello," " " "world!" " " " " } } -[ "hello, world! " [ blank? ] slice-when [ >string ] map ] unit-test +[ "hello, world! " [ ascii:blank? ] slice-when [ >string ] map ] unit-test { t } [ "abc" sequence>slice slice? ] unit-test @@ -123,15 +123,15 @@ tools.test vectors vocabs ; { "ADEBFC" } [ { "ABC" "D" "EF" } round-robin >string ] unit-test { { } } [ "ABC" [ ] { } trim-as ] unit-test -{ "ABC" } [ { 32 65 66 67 32 } [ blank? ] "" trim-as ] unit-test +{ "ABC" } [ { 32 65 66 67 32 } [ ascii:blank? ] "" trim-as ] unit-test -{ t } [ "ABC" dup [ blank? ] ?trim [ identity-hashcode ] same? ] unit-test -{ "ABC" } [ " ABC " [ blank? ] ?trim ] unit-test +{ t } [ "ABC" dup [ ascii:blank? ] ?trim [ identity-hashcode ] same? ] unit-test +{ "ABC" } [ " ABC " [ ascii:blank? ] ?trim ] unit-test -{ t } [ "ABC" dup [ blank? ] ?trim-head [ identity-hashcode ] same? ] unit-test -{ t } [ "ABC" dup [ blank? ] ?trim-tail [ identity-hashcode ] same? ] unit-test -{ "ABC " } [ " ABC " [ blank? ] ?trim-head ] unit-test -{ " ABC" } [ " ABC " [ blank? ] ?trim-tail ] unit-test +{ t } [ "ABC" dup [ ascii:blank? ] ?trim-head [ identity-hashcode ] same? ] unit-test +{ t } [ "ABC" dup [ ascii:blank? ] ?trim-tail [ identity-hashcode ] same? ] unit-test +{ "ABC " } [ " ABC " [ ascii:blank? ] ?trim-head ] unit-test +{ " ABC" } [ " ABC " [ ascii:blank? ] ?trim-tail ] unit-test { "" } [ "" "" "" unsurround ] unit-test { "" } [ " " " " " " unsurround ] unit-test @@ -211,10 +211,10 @@ tools.test vectors vocabs ; { "cdef" } [ 2 f "abcdef" subseq* ] unit-test { "cd" } [ -4 -2 "abcdef" subseq* ] unit-test -{ "foo" "" } [ "foo" [ blank? ] cut-when ] unit-test -{ "foo" " " } [ "foo " [ blank? ] cut-when ] unit-test -{ "" " foo" } [ " foo" [ blank? ] cut-when ] unit-test -{ "foo" " bar" } [ "foo bar" [ blank? ] cut-when ] unit-test +{ "foo" "" } [ "foo" [ ascii:blank? ] cut-when ] unit-test +{ "foo" " " } [ "foo " [ ascii:blank? ] cut-when ] unit-test +{ "" " foo" } [ " foo" [ ascii:blank? ] cut-when ] unit-test +{ "foo" " bar" } [ "foo bar" [ ascii:blank? ] cut-when ] unit-test { { 4 0 3 1 2 } } [ { 0 4 1 3 2 } 5 [ nth* ] curry map ] unit-test diff --git a/extra/splitting/extras/extras-tests.factor b/extra/splitting/extras/extras-tests.factor index 045f22e666..75b62958c9 100644 --- a/extra/splitting/extras/extras-tests.factor +++ b/extra/splitting/extras/extras-tests.factor @@ -21,7 +21,7 @@ tools.test ; { { "hello" " " " " " " "world" } } [ "hello world" - [ [ blank? ] find drop ] split-find + [ [ ascii:blank? ] find drop ] split-find [ >string ] map ] unit-test diff --git a/extra/text-analysis/text-analysis.factor b/extra/text-analysis/text-analysis.factor index 846ed9f707..88f537953a 100644 --- a/extra/text-analysis/text-analysis.factor +++ b/extra/text-analysis/text-analysis.factor @@ -11,7 +11,7 @@ IN: text-analysis { help-webapp "search" } >>template [ - "search" param [ blank? ] trim [ + "search" param [ unicode:blank? ] trim [ help-dir [ [ article-apropos links "articles" set-value ] [ word-apropos links "words" set-value ] -- 2.34.1