]> gitweb.factorcode.org Git - factor.git/commitdiff
webapps.help: fix using, strip qualified prefix
authorJohn Benediktsson <mrjbq7@gmail.com>
Sun, 19 Jun 2022 00:47:56 +0000 (17:47 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sun, 19 Jun 2022 00:47:56 +0000 (17:47 -0700)
extra/webapps/help/help.factor

index faac2d4fd46da7304b6d48b66006c09b535179a2..73066f5ec7446e30395f34dd6a9cabd8ec4dd940 100644 (file)
@@ -4,15 +4,15 @@ USING: accessors assocs furnace.actions furnace.boilerplate
 furnace.redirection help.html help.topics html.components
 html.forms http.server http.server.dispatchers
 http.server.static io.directories io.files.temp io.servers
-kernel namespaces sequences unicode urls ;
+kernel namespaces sequences splitting unicode urls ;
 IN: webapps.help
 
 TUPLE: help-webapp < dispatcher ;
 
 : fixup-words ( title href -- title' href' )
     dup "word-" head? [
-        dup ".html" ?tail drop "," split1-last nip
-        '[ " (" _ 3append ")" append ] dip
+        dup ".html" ?tail drop "," split1-last nip dup ":" append
+        '[ " (" _ 3append ")" append _ ?head drop ] dip
     ] when ;
 
 : links ( apropos -- seq )