]> gitweb.factorcode.org Git - factor.git/commitdiff
help.syntax: only allow help.markup $words
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 31 Oct 2022 03:57:43 +0000 (20:57 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 31 Oct 2022 03:58:01 +0000 (20:58 -0700)
basis/help/syntax/syntax.factor

index 2cb4614c6ca5f49d4ba3ebc6f87703eaa3f43020..b45bfd3ee7904d070d9e67e4e4195902feb42d61 100644 (file)
@@ -17,7 +17,7 @@ DEFER: HELP{
     ?scan-token dup {
         [ "{" = [ \ HELP{ ] [ f ] if ]
         [ "syntax" lookup-word ]
-        [ "help.markup" lookup-word ]
+        [ { [ "$" head? ] [ "help.markup" lookup-word ] } 1&& ]
         [ dup ?last ":{[(/\"" member-eq? [ search ] [ drop f ] if ]
     } 1|| {
         { [ dup not ] [ drop ] }