]> gitweb.factorcode.org Git - factor.git/blob - basis/farkup/farkup-docs.factor
Merge branch 'master' into experimental (untested!)
[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 ( string -- 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" } }
18 { $description "Writes a Farkup syntax tree as HTML on " { $link output-stream } "." } ;
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 programatically traversed and mutated before being passed on to " { $link write-farkup } "."
22 { $subsection heading1 }
23 { $subsection heading2 }
24 { $subsection heading3 }
25 { $subsection heading4 }
26 { $subsection strong }
27 { $subsection emphasis }
28 { $subsection superscript }
29 { $subsection subscript }
30 { $subsection inline-code }
31 { $subsection paragraph }
32 { $subsection list-item }
33 { $subsection unordered-list }
34 { $subsection ordered-list }
35 { $subsection table }
36 { $subsection table-row }
37 { $subsection link }
38 { $subsection image }
39 { $subsection code } ;
40
41 ARTICLE: "farkup" "Farkup"
42 "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" } "."
43 $nl
44 "The main entry points for converting Farkup to HTML:"
45 { $subsection convert-farkup }
46 { $subsection write-farkup }
47 "The syntax tree of a piece of Farkup can also be inspected and modified:"
48 { $subsection parse-farkup }
49 { $subsection (write-farkup) }
50 { $subsection "farkup-ast" } ;
51
52 ABOUT: "farkup"