1 USING: help.markup help.syntax strings io ;
5 { $values { "string" string } { "string'" string } }
6 { $description "Parse a Farkup string and convert it to an HTML string." } ;
9 { $values { "string" string } }
10 { $description "Parse a Farkup string and writes the resulting HTML to " { $link output-stream } "." } ;
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" } "." } ;
17 { $values { "farkup" "a Farkup syntax tree node" } { "xml" "an XML chunk" } }
18 { $description "Converts a Farkup syntax tree node to XML." } ;
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 }
36 { $subsection table-row }
39 { $subsection code } ;
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" } "."
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" } ;