]> gitweb.factorcode.org Git - factor.git/commitdiff
help.syntax: tweak algo
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 17 Aug 2023 21:32:24 +0000 (14:32 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 17 Aug 2023 21:32:24 +0000 (14:32 -0700)
basis/help/syntax/syntax-tests.factor
basis/help/syntax/syntax.factor

index cb07a35f9beebb3e82ed98536e74e6416011eab3..deb8bb74d092ba9a27255b8eb850ddabcb4fc9a4 100644 (file)
@@ -66,3 +66,7 @@ tools.test vocabs ;
 { { $description "the " { $link + } "'s " "are awesome" } } [
     HELP{ $description "the " \ + "'s " are awesome }
 ] unit-test
+
+{ { $description "this and " { $link + } ", and that" } } [
+    HELP{ $description this and { $link + } , and that }
+] unit-test
index 2cbc1261a925072b0267be95d87bdf44a634d184..af81760f71dd40ac2b62afd729b388dbd5667b29 100644 (file)
@@ -40,7 +40,7 @@ DEFER: HELP{
             last [ string? not ] [ \ $nl = not ] bi and
         ] if-empty
     ] [
-        dup last " (" member? not
+        over last " (" member? not
     ] if
     over string? [ over ?first " .,;:)" member? not and ] when
     [ [ CHAR: \s suffix! ] dip ] when ;