From a17da74181fc87938aee868e6e6f097b2119edc6 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Sat, 18 Jun 2022 17:17:52 -0700 Subject: [PATCH] webapps.help: show vocabulary in word title. --- extra/webapps/help/help.factor | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/extra/webapps/help/help.factor b/extra/webapps/help/help.factor index d6f46f3166..faac2d4fd4 100644 --- a/extra/webapps/help/help.factor +++ b/extra/webapps/help/help.factor @@ -9,8 +9,14 @@ 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 + ] when ; + : links ( apropos -- seq ) - [ swap ] { } assoc>map ; + [ swap fixup-words ] { } assoc>map ; : ?links ( has-links? apropos -- has-links? seq/f ) links [ f ] [ nip t swap ] if-empty ; -- 2.34.1