]> gitweb.factorcode.org Git - factor.git/commitdiff
easy-help: no spaces when punctuation follows.
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 14 Dec 2020 23:33:53 +0000 (15:33 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 14 Dec 2020 23:33:53 +0000 (15:33 -0800)
extra/easy-help/easy-help.factor

index 76c4194dd681961c900679c06969d034ca3b2790..1df9498a18d3e18dbb1c45862979db130e5215cd 100644 (file)
@@ -29,8 +29,14 @@ IN: easy-help
             ] when
         ] dip [
             [
-                [ push-help-space ] dip
-                dup string? [ append! ] [ push-help-text ] if
+                dup string? [
+                    dup ?first ".,;:" member? [
+                        [ push-help-space ] dip
+                    ] unless append!
+                ] [
+                    [ push-help-space ]
+                    [ push-help-text ] bi*
+                ] if
             ] when*
         ] keep
     ] loop [ >string suffix! ] unless-empty >array ; inline