]> gitweb.factorcode.org Git - factor.git/commitdiff
fuel.help: fix for a small help bug on vocabs without words in them
authorBjörn Lindqvist <bjourne@gmail.com>
Mon, 26 Jun 2017 13:53:54 +0000 (15:53 +0200)
committerBjörn Lindqvist <bjourne@gmail.com>
Mon, 26 Jun 2017 13:53:54 +0000 (15:53 +0200)
extra/fuel/help/help-tests.factor
extra/fuel/help/help.factor

index f62145ae687627804f28a3f09a61aca89e29f23a..914951fb429015a242bfd5021f58f1ff8d2b5b00 100644 (file)
@@ -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
index 582aafaace36ab5138812f109004857920943056..433c40a03bbf5e32d9c98fe3a54171fe1407e277 100644 (file)
@@ -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