Quote search terms

This commit is contained in:
Tony Garnock-Jones 2014-11-08 19:27:17 -05:00
parent abc9789bff
commit 538d1a8804
2 changed files with 1 additions and 3 deletions

View File

@ -11,8 +11,6 @@ Some way of getting a list of all packages
Want to be able to sort result tables
Searching for e.g. "(list 1 2)" causes a regexp compilation failure.
you should be able to specify git repos over http/https
you should be able to specify subdirs in git repos
you should check the existence of repos/github repos/urls/etc via XHR

View File

@ -194,7 +194,7 @@
(regexp-match? re (@ pkg _SEARCHABLE-TEXT_))))
(define (package-search text tags)
(define res (map (lambda (r) (pregexp (format "(?i:~a)" r))) (string-split text)))
(define res (map (lambda (r) (regexp (regexp-quote r))) (string-split text)))
(define packages (manager-rpc 'packages))
(sort-package-names
(filter (lambda (package-name)