]> gitweb.factorcode.org Git - factor.git/blob - extra/webapps/wiki/initial-content/Farkup.txt
webapps.mason: fix typo
[factor.git] / extra / webapps / wiki / initial-content / Farkup.txt
1 Look at the source to this page by clicking *Edit* to compare the farkup language with resulting output.
2
3 = level 1 heading =
4
5 == level 2 heading ==
6
7 === level 3 heading ===
8
9 ==== level 4 heading ====
10
11 Here is a paragraph of text, with _emphasized_ and *strong* text, together with an inline %code snippet%. Did you know that E=mc^2^, and L~2~ spaces are cool? Of course, if you want to include \_ special \* characters \^ you \~ can \% do that, too.
12
13 You can make [[Wiki Links]] just like that, as well as links to external sites: [[http://sbcl.sourceforge.net]]. [[Factor|Custom link text]] can be used [[http://www.apple.com|with both types of links]].
14
15 Images can be embedded in the text:
16
17 [[image:http://factorcode.org/graphics/logo.png]]
18
19 Unordered lists:
20
21 - a list
22 - with three
23 - items
24
25 Ordered lists:
26
27 # a list
28 # with three
29 # numbered items
30
31 Horizontal lines:
32
33 ___
34
35 Tables:
36
37 |a table|with|four|columns|
38 |and|two|rows|...|
39
40 Here is some code:
41
42 [{HAI
43 CAN HAS STDIO?
44 VISIBLE "HAI WORLD!"
45 KTHXBYE}]
46
47 There is syntax highlighting for various languages, too:
48
49 [factor{PEG: parse-request-line ( string -- triple )
50     #! Triple is { method url version }
51     [ 
52         'space' ,
53         'http-method' ,
54         'space' ,
55         'url' ,
56         'space' ,
57         'http-version' ,
58         'space' ,
59     ] seq* just ;}]
60
61 Some Java:
62
63 [java{/**
64  * Returns the extension of the specified filename, or an empty
65  * string if there is none.
66  * @param path The path
67  */
68 public static String getFileExtension(String path)
69 {
70     int fsIndex = getLastSeparatorIndex(path);
71     int index = path.lastIndexOf('.');
72     // there could be a dot in the path and no file extension
73     if(index == -1 || index < fsIndex )
74         return "";
75     else
76         return path.substring(index);
77 }}]