]> gitweb.factorcode.org Git - factor.git/commitdiff
help.syntax: add documentation for HELP{
authorrazetime <raghuallthetime@hotmail.com>
Tue, 6 Dec 2022 14:54:00 +0000 (20:24 +0530)
committerrazetime <raghuallthetime@hotmail.com>
Tue, 6 Dec 2022 14:54:00 +0000 (20:24 +0530)
basis/help/help-docs.factor

index bd1e3f5f9834249c9aaa591454389a6c1db01010..28c29727c5d82928d6cfa13b770b4f5a119de02c 100644 (file)
@@ -529,3 +529,23 @@ HELP: vocab-help
 HELP: orphan-articles
 { $values { "seq" "vocab names" } }
 { $description "Retrieves all vocabs without parents, except for 'help.home' and 'handbook' which are special." } ;
+
+HELP: HELP{
+{ $syntax "HELP{ help-markup }" }
+{ $description "Generates help markup using syntax that does not require literal strings.
+Has some known problems with syntax words, which need to be quoted inside the " { $snippet "HELP{ }" } 
+ " definition." }
+{ $examples
+  { $code
+      "HELP{ I am a doc string.
+
+      This is a second paragraph. { $snippet \"code snippet\" }
+}"
+  }
+  "generates"
+  { $code
+      "{ \"I am a doc string.\" $nl \"This is a second paragraph.\" { $snippet \"code snippet\" } }"
+  }
+} 
+;
+