From 6faa17289558a845ef0776a2c6d390ffca23cefa Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Mon, 29 Sep 2008 05:08:16 -0500 Subject: [PATCH] Sort search results, better template --- basis/help/html/html.factor | 6 ++++-- extra/webapps/help/search.xml | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/basis/help/html/html.factor b/basis/help/html/html.factor index d14db69c5a..525db1352f 100644 --- a/basis/help/html/html.factor +++ b/basis/help/html/html.factor @@ -4,7 +4,8 @@ USING: io.encodings.utf8 io.encodings.ascii io.encodings.binary io.files html.streams html.elements html.components help kernel assocs sequences make words accessors arrays help.topics vocabs tools.vocabs tools.vocabs.browser namespaces prettyprint io -vocabs.loader serialize fry memoize unicode.case ; +vocabs.loader serialize fry memoize unicode.case math.order +sorting ; IN: help.html : escape-char ( ch -- ) @@ -106,7 +107,8 @@ M: result link-href href>> ; : offline-apropos ( string index -- results ) load-index swap >lower '[ [ drop _ ] dip >lower subseq? ] assoc-filter - [ swap result boa ] { } assoc>map ; + [ swap result boa ] { } assoc>map + [ [ title>> ] compare ] sort ; : article-apropos ( string -- results ) "articles.idx" offline-apropos ; diff --git a/extra/webapps/help/search.xml b/extra/webapps/help/search.xml index b5c6eb3fac..5569698dc6 100644 --- a/extra/webapps/help/search.xml +++ b/extra/webapps/help/search.xml @@ -19,10 +19,12 @@

Factor help

+ target="content">Factor documentation -

This documentation was generated offline from a Factor - image where load-everything was run.

+

This is the Factor + documentation, generated offline from a + load-everything image. The Factor UI also + includes a documentation browser tool.

You may search article titles below.