From eb62e1fe4e9352fe04186b1a467a4cfc689cbe3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Lindqvist?= Date: Mon, 26 Jun 2017 15:53:54 +0200 Subject: [PATCH] fuel.help: fix for a small help bug on vocabs without words in them --- extra/fuel/help/help-tests.factor | 6 ++++++ extra/fuel/help/help.factor | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/extra/fuel/help/help-tests.factor b/extra/fuel/help/help-tests.factor index f62145ae68..914951fb42 100644 --- a/extra/fuel/help/help-tests.factor +++ b/extra/fuel/help/help-tests.factor @@ -16,3 +16,9 @@ IN: fuel.help.tests { { $next-link POSTPONE: unit-test "unit-test" } } [ \ unit-test >link \ $next-link next/prev-link ] unit-test + +{ + { describe-words f } +} [ + "help.handbook" vocab-describe-words +] unit-test diff --git a/extra/fuel/help/help.factor b/extra/fuel/help/help.factor index 582aafaace..433c40a03b 100644 --- a/extra/fuel/help/help.factor +++ b/extra/fuel/help/help.factor @@ -75,7 +75,8 @@ SYMBOL: describe-words disk-vocabs-for-prefix do-vocab-list ; inline : vocab-describe-words ( name -- element ) - [ words. ] with-string-writer \ describe-words swap 2array ; inline + [ words. ] with-string-writer dup "\n" = [ drop f ] when + \ describe-words swap 2array ; inline : vocab-element ( name -- element ) dup require \ article swap dup >vocab-link