]> gitweb.factorcode.org Git - factor.git/blob - basis/farkup/farkup-docs.factor
Append input history to ~/.factor-history upon UI Listener ending
[factor.git] / basis / farkup / farkup-docs.factor
1 USING: help.markup help.syntax strings io ;
2 IN: farkup
3
4 HELP: convert-farkup
5 { $values { "string" string } { "string'" string } }
6 { $description "Parse a Farkup string and convert it to an HTML string." } ;
7
8 HELP: write-farkup
9 { $values { "string" string } }
10 { $description "Parse a Farkup string and writes the resulting HTML to " { $link output-stream } "." } ;
11
12 HELP: parse-farkup
13 { $values { "string" string } { "farkup" "a Farkup syntax tree node" } }
14 { $description "Parses Farkup and outputs a tree of " { $link "farkup-ast" } "." } ;
15
16 HELP: (write-farkup)
17 { $values { "farkup" "a Farkup syntax tree node" } { "xml" "an XML chunk" } }
18 { $description "Converts a Farkup syntax tree node to XML." } ;
19
20 ARTICLE: "farkup-ast" "Farkup syntax tree nodes"
21 "The " { $link parse-farkup } " word outputs a tree of nodes corresponding to the Farkup syntax of the input string. This tree can be programmatically traversed and mutated before being passed on to " { $link write-farkup } "."
22 { $subsections
23     heading1
24     heading2
25     heading3
26     heading4
27     strong
28     emphasis
29     superscript
30     subscript
31     inline-code
32     paragraph
33     list-item
34     unordered-list
35     ordered-list
36     table
37     table-row
38     link
39     image
40     code
41 } ;
42
43 ARTICLE: "farkup" "Farkup"
44 "The " { $vocab-link "farkup" } " vocabulary implements Farkup (Factor mARKUP), a simple markup language. Farkup was loosely based on the markup languages employed by MediaWiki and " { $url "http://reddit.com" } "."
45 $nl
46 "The main entry points for converting Farkup to HTML:"
47 { $subsections
48     convert-farkup
49     write-farkup
50 }
51 "The syntax tree of a piece of Farkup can also be inspected and modified:"
52 { $subsections
53     parse-farkup
54     (write-farkup)
55     "farkup-ast"
56 } ;
57
58 ABOUT: "farkup"