gmccreight-WikiCreole 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/COPYING +340 -0
- data/Changelog +34 -0
- data/LICENSE +52 -0
- data/README +14 -0
- data/Rakefile +26 -0
- data/lib/wiki_creole.rb +973 -0
- data/test/profiling.rb +22 -0
- data/test/test_all.rb +891 -0
- data/test/test_amp.html +3 -0
- data/test/test_amp.markup +2 -0
- data/test/test_block.html +131 -0
- data/test/test_block.markup +69 -0
- data/test/test_escape.html +33 -0
- data/test/test_escape.markup +35 -0
- data/test/test_inline.html +67 -0
- data/test/test_inline.markup +48 -0
- data/test/test_jsp_wiki.html +157 -0
- data/test/test_jsp_wiki.markup +100 -0
- data/test/test_nested_lists.html +10 -0
- data/test/test_nested_lists.markup +4 -0
- data/test/test_release_attributes.rb +37 -0
- data/test/test_specialchars.html +29 -0
- data/test/test_specialchars.markup +18 -0
- metadata +77 -0
data/test/test_amp.html
ADDED
@@ -0,0 +1,131 @@
|
|
1
|
+
<ul>
|
2
|
+
<li>list at start of file</li>
|
3
|
+
<ul>
|
4
|
+
<li>second level</li>
|
5
|
+
<ol>
|
6
|
+
<li>third level numbered list</li>
|
7
|
+
<li>second one</li>
|
8
|
+
</ol>
|
9
|
+
<li>back to second level</li>
|
10
|
+
</ul>
|
11
|
+
</ul>
|
12
|
+
<p>Just a regular paragraph</p>
|
13
|
+
|
14
|
+
<ul>
|
15
|
+
<li>interrupted by a list</li>
|
16
|
+
</ul>
|
17
|
+
<p>another
|
18
|
+
paragraph</p>
|
19
|
+
|
20
|
+
<table>
|
21
|
+
<tr>
|
22
|
+
<td>interrupted by</td>
|
23
|
+
<td>a table</td>
|
24
|
+
</tr>
|
25
|
+
<tr>
|
26
|
+
<td>r2c1</td>
|
27
|
+
<td>r2c2</td>
|
28
|
+
</tr>
|
29
|
+
</table>
|
30
|
+
|
31
|
+
<p>another paragraph</p>
|
32
|
+
|
33
|
+
<h1>interrupted by a heading</h1>
|
34
|
+
|
35
|
+
<ul>
|
36
|
+
<li>how about a list</li>
|
37
|
+
</ul>
|
38
|
+
<h6>interrupted by a small heading</h6>
|
39
|
+
|
40
|
+
<ul>
|
41
|
+
<li>this is a new list</li>
|
42
|
+
</ul>
|
43
|
+
<table>
|
44
|
+
<tr>
|
45
|
+
<td>tables</td>
|
46
|
+
<td>can be interrupted</td>
|
47
|
+
</tr>
|
48
|
+
</table>
|
49
|
+
|
50
|
+
<p>by paragraphs</p>
|
51
|
+
|
52
|
+
<table>
|
53
|
+
<tr>
|
54
|
+
<td>tables</td>
|
55
|
+
<td>can be interrupted</td>
|
56
|
+
</tr>
|
57
|
+
</table>
|
58
|
+
|
59
|
+
<ol>
|
60
|
+
<li>by lists</li>
|
61
|
+
</ol>
|
62
|
+
<table>
|
63
|
+
<tr>
|
64
|
+
<td>tables</td>
|
65
|
+
<td>can be interrupted</td>
|
66
|
+
</tr>
|
67
|
+
</table>
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>by anything</dt>
|
71
|
+
<dd>that's not a table</dd>
|
72
|
+
</dl>
|
73
|
+
<ul>
|
74
|
+
<li>a list</li>
|
75
|
+
<li>can be interrupted</li>
|
76
|
+
</ul>
|
77
|
+
<div style="margin-left: 2em"><p> by an indented paragraph</p>
|
78
|
+
|
79
|
+
</div>
|
80
|
+
<ul>
|
81
|
+
<li>a list</li>
|
82
|
+
<li>can be interrupted</li>
|
83
|
+
</ul>
|
84
|
+
<pre>
|
85
|
+
by a nowiki block
|
86
|
+
</pre>
|
87
|
+
|
88
|
+
<p>a paragraph can
|
89
|
+
be interrupted</p>
|
90
|
+
|
91
|
+
<pre>
|
92
|
+
by a nowiki block
|
93
|
+
</pre>
|
94
|
+
|
95
|
+
<dl>
|
96
|
+
<dt>any block can be</dt>
|
97
|
+
<dd></dd>
|
98
|
+
<dd>interrupted</dd>
|
99
|
+
</dl>
|
100
|
+
<pre>
|
101
|
+
by a nowiki block
|
102
|
+
</pre>
|
103
|
+
|
104
|
+
<p>horizontal lines</p>
|
105
|
+
|
106
|
+
<hr />
|
107
|
+
|
108
|
+
<p>also interrupt other blocks</p>
|
109
|
+
|
110
|
+
<pre>
|
111
|
+
-----
|
112
|
+
but not nowiki
|
113
|
+
</pre>
|
114
|
+
|
115
|
+
<ul>
|
116
|
+
<li>see, lists</li>
|
117
|
+
</ul>
|
118
|
+
<hr />
|
119
|
+
|
120
|
+
<ul>
|
121
|
+
<li>are interrupted by lines also</li>
|
122
|
+
</ul>
|
123
|
+
<dl>
|
124
|
+
<dt>crazy stuff happens</dt>
|
125
|
+
<dd></dd>
|
126
|
+
</dl>
|
127
|
+
<hr />
|
128
|
+
|
129
|
+
<div style="margin-left: 2em"><p> when a line splits a definition list</p>
|
130
|
+
|
131
|
+
</div>
|
@@ -0,0 +1,69 @@
|
|
1
|
+
* list at start of file
|
2
|
+
** second level
|
3
|
+
### third level numbered list
|
4
|
+
### second one
|
5
|
+
** back to second level
|
6
|
+
|
7
|
+
Just a regular paragraph
|
8
|
+
* interrupted by a list
|
9
|
+
|
10
|
+
another
|
11
|
+
paragraph
|
12
|
+
| interrupted by | a table
|
13
|
+
| r2c1 | r2c2
|
14
|
+
|
15
|
+
another paragraph
|
16
|
+
= interrupted by a heading
|
17
|
+
|
18
|
+
* how about a list
|
19
|
+
====== interrupted by a small heading
|
20
|
+
* this is a new list
|
21
|
+
|
22
|
+
| tables | can be interrupted |
|
23
|
+
by paragraphs
|
24
|
+
|
25
|
+
| tables | can be interrupted |
|
26
|
+
# by lists
|
27
|
+
|
28
|
+
| tables | can be interrupted |
|
29
|
+
; by anything: that's not a table
|
30
|
+
|
31
|
+
* a list
|
32
|
+
* can be interrupted
|
33
|
+
: by an indented paragraph
|
34
|
+
|
35
|
+
* a list
|
36
|
+
* can be interrupted
|
37
|
+
{{{
|
38
|
+
by a nowiki block
|
39
|
+
}}}
|
40
|
+
|
41
|
+
a paragraph can
|
42
|
+
be interrupted
|
43
|
+
{{{
|
44
|
+
by a nowiki block
|
45
|
+
}}}
|
46
|
+
|
47
|
+
; any block can be
|
48
|
+
: interrupted
|
49
|
+
{{{
|
50
|
+
by a nowiki block
|
51
|
+
}}}
|
52
|
+
|
53
|
+
horizontal lines
|
54
|
+
-----
|
55
|
+
also interrupt other blocks
|
56
|
+
|
57
|
+
{{{
|
58
|
+
-----
|
59
|
+
but not nowiki
|
60
|
+
}}}
|
61
|
+
|
62
|
+
* see, lists
|
63
|
+
-----
|
64
|
+
* are interrupted by lines also
|
65
|
+
|
66
|
+
; crazy stuff happens
|
67
|
+
-----
|
68
|
+
: when a line splits a definition list
|
69
|
+
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<p>use the escape character to stop
|
2
|
+
{{{
|
3
|
+
nowiki blocks from being
|
4
|
+
nowiki blocks
|
5
|
+
}}}</p>
|
6
|
+
|
7
|
+
<p>* escape lists</p>
|
8
|
+
|
9
|
+
<ul>
|
10
|
+
<li>you can also
|
11
|
+
* escape the second list item</li>
|
12
|
+
</ul>
|
13
|
+
<p>= escape a heading</p>
|
14
|
+
|
15
|
+
<p>: escape an indented paragraph</p>
|
16
|
+
|
17
|
+
<p>escape a horizontal line
|
18
|
+
-––</p>
|
19
|
+
|
20
|
+
<p>| escape a | table
|
21
|
+
| r2c1 | rc2c |</p>
|
22
|
+
|
23
|
+
<p>{{{
|
24
|
+
escape nowiki <strong> with bold in it </strong>
|
25
|
+
}}}</p>
|
26
|
+
|
27
|
+
<p>; escape definition lists
|
28
|
+
: like so</p>
|
29
|
+
|
30
|
+
<p>you can also escape inline markup
|
31
|
+
like ** bold **, // italics//, \\ newlines,
|
32
|
+
[[ links ]], {{images}}, etc</p>
|
33
|
+
|
@@ -0,0 +1,35 @@
|
|
1
|
+
use the escape character to stop
|
2
|
+
~{{{
|
3
|
+
nowiki blocks from being
|
4
|
+
nowiki blocks
|
5
|
+
}}}
|
6
|
+
|
7
|
+
~* escape lists
|
8
|
+
|
9
|
+
* you can also
|
10
|
+
~* escape the second list item
|
11
|
+
|
12
|
+
~= escape a heading
|
13
|
+
|
14
|
+
~: escape an indented paragraph
|
15
|
+
|
16
|
+
escape a horizontal line
|
17
|
+
~-----
|
18
|
+
|
19
|
+
~| escape a | table
|
20
|
+
~| r2c1 | rc2c |
|
21
|
+
|
22
|
+
~{{{
|
23
|
+
escape nowiki ** with bold in it **
|
24
|
+
}}}
|
25
|
+
|
26
|
+
~; escape definition lists
|
27
|
+
~: like so
|
28
|
+
|
29
|
+
you can also escape inline markup
|
30
|
+
like ~** bold ~**, ~// italics~//, ~\\ newlines,
|
31
|
+
~[[ links ]], ~{{images}}, etc
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
|
@@ -0,0 +1,67 @@
|
|
1
|
+
<p><strong> bold at at start of file </strong></p>
|
2
|
+
|
3
|
+
<p><strong>bold</strong>, <em>italics</em>, <u>underline</u>, <sup>superscript</sup>, <u>subscript</u>,
|
4
|
+
and <tt>monospace</tt> all work the same way.</p>
|
5
|
+
|
6
|
+
<p><em> italics at start of paragraph </em></p>
|
7
|
+
|
8
|
+
<p>a paragraph with
|
9
|
+
<tt> monospace in the middle </tt>
|
10
|
+
with more after</p>
|
11
|
+
|
12
|
+
<p><u> underline with
|
13
|
+
no closing
|
14
|
+
markup</u></p>
|
15
|
+
|
16
|
+
<ul>
|
17
|
+
<li><sub> subscript as first list item,
|
18
|
+
continued on second line </sub></li>
|
19
|
+
</ul>
|
20
|
+
<ul>
|
21
|
+
<li>first list item</li>
|
22
|
+
<li><sup> superscript as second item, no closing tag</sup></li>
|
23
|
+
<li>with more to come</li>
|
24
|
+
</ul>
|
25
|
+
<h1>heading <strong> with bold </strong>, which is redundant but possible</h1>
|
26
|
+
|
27
|
+
<h2>heading <em> with italics </em> is not redundant</h2>
|
28
|
+
|
29
|
+
<table>
|
30
|
+
<tr>
|
31
|
+
<td>here's a table</td>
|
32
|
+
<td>with <em> italics in it</em></td>
|
33
|
+
</tr>
|
34
|
+
<tr>
|
35
|
+
<td>second row <sup> squared </sup></td>
|
36
|
+
<td>etcetera</td>
|
37
|
+
</tr>
|
38
|
+
</table>
|
39
|
+
|
40
|
+
<p>here's a <a href="link">link <em><strong> with bold italics </strong></em> in it</a>.
|
41
|
+
here's some <u><em> <strong> bold </strong> inside italics </em> and underlined </u>.
|
42
|
+
here's what happens when you don't mix <strong> bold and <em> italics </em></strong> <em> properly.
|
43
|
+
don't try it in <tt> __ inline nowiki __ </tt>, but feel free to put it
|
44
|
+
<tt> </tt></em> inside monospace <em> <tt>. </tt></em></p>
|
45
|
+
|
46
|
+
<pre>
|
47
|
+
no point in trying to put ^^ superscript ^^ inside nowiki blocks either
|
48
|
+
</pre>
|
49
|
+
|
50
|
+
<div style="margin-left: 2em"><p> should also be able to put <strong> bold <sup> and superscript </sup> </strong> in an
|
51
|
+
indented paragraph</p>
|
52
|
+
|
53
|
+
</div>
|
54
|
+
<dl>
|
55
|
+
<dt>how 'bout <strong><u> Underlined bold </u></strong> in a definition list?</dt>
|
56
|
+
<dd></dd>
|
57
|
+
<dd>not to mention, the actual <em> italicized definition </em></dd>
|
58
|
+
</dl>
|
59
|
+
<ul>
|
60
|
+
<li>first item</li>
|
61
|
+
<ol>
|
62
|
+
<li><tt> monospace <strong> with bold </strong> as first subitem in numbered list </tt></li>
|
63
|
+
<ul>
|
64
|
+
<li>another sublist after <em> with italics </em></li>
|
65
|
+
</ul>
|
66
|
+
</ol>
|
67
|
+
</ul>
|
@@ -0,0 +1,48 @@
|
|
1
|
+
** bold at at start of file **
|
2
|
+
|
3
|
+
**bold**, //italics//, __underline__, ^^superscript^^, __subscript__,
|
4
|
+
and ##monospace## all work the same way.
|
5
|
+
|
6
|
+
// italics at start of paragraph //
|
7
|
+
|
8
|
+
a paragraph with
|
9
|
+
## monospace in the middle ##
|
10
|
+
with more after
|
11
|
+
|
12
|
+
__ underline with
|
13
|
+
no closing
|
14
|
+
markup
|
15
|
+
|
16
|
+
* ,, subscript as first list item,
|
17
|
+
continued on second line ,,
|
18
|
+
|
19
|
+
* first list item
|
20
|
+
* ^^ superscript as second item, no closing tag
|
21
|
+
* with more to come
|
22
|
+
|
23
|
+
= heading ** with bold **, which is redundant but possible
|
24
|
+
== heading // with italics // is not redundant
|
25
|
+
|
26
|
+
|
27
|
+
| here's a table | with // italics in it
|
28
|
+
| second row ^^ squared ^^ | etcetera
|
29
|
+
|
30
|
+
here's a [[ link | link //** with bold italics **// in it ]].
|
31
|
+
here's some __// ** bold ** inside italics // and underlined __.
|
32
|
+
here's what happens when you don't mix ** bold and // italics ** // properly.
|
33
|
+
don't try it in {{{ __ inline nowiki __ }}}, but feel free to put it
|
34
|
+
## // inside monospace // ##.
|
35
|
+
|
36
|
+
{{{
|
37
|
+
no point in trying to put ^^ superscript ^^ inside nowiki blocks either
|
38
|
+
}}}
|
39
|
+
|
40
|
+
: should also be able to put ** bold ^^ and superscript ^^ ** in an
|
41
|
+
indented paragraph
|
42
|
+
|
43
|
+
; how 'bout **__ Underlined bold __** in a definition list?
|
44
|
+
: not to mention, the actual // italicized definition //
|
45
|
+
|
46
|
+
* first item
|
47
|
+
## ## monospace ** with bold ** as first subitem in numbered list ##
|
48
|
+
*** another sublist after // with italics //
|
@@ -0,0 +1,157 @@
|
|
1
|
+
<h1>Top-level heading (1)</h1>
|
2
|
+
|
3
|
+
<h2>This a test for creole 0.1 (2)</h2>
|
4
|
+
|
5
|
+
<h3>This is a Subheading (3)</h3>
|
6
|
+
|
7
|
+
<h4>Subsub (4)</h4>
|
8
|
+
|
9
|
+
<h5>Subsubsub (5)</h5>
|
10
|
+
|
11
|
+
<p>The ending equal signs should not be displayed:</p>
|
12
|
+
|
13
|
+
<h1>Top-level heading (1)</h1>
|
14
|
+
|
15
|
+
<h2>This a test for creole 0.1 (2)</h2>
|
16
|
+
|
17
|
+
<h3>This is a Subheading (3)</h3>
|
18
|
+
|
19
|
+
<h4>Subsub (4)</h4>
|
20
|
+
|
21
|
+
<h5>Subsubsub (5)</h5>
|
22
|
+
|
23
|
+
<p>You can make things <strong>strong</strong> or <em>em</em> or <strong><em>both</em></strong> or <em><strong>both</strong></em>.</p>
|
24
|
+
|
25
|
+
<p>Character formatting extends across line breaks: <strong>strong,
|
26
|
+
this is still strong. This line deliberately does not end in star-star.</strong></p>
|
27
|
+
|
28
|
+
<p>Not strong. Character formatting does not cross paragraph boundaries.</p>
|
29
|
+
|
30
|
+
<p>Creole1.0 specifies that <a href="http://bar">http://bar</a> and <a href="ftp://bar">ftp://bar</a> should not render italic,
|
31
|
+
something like foo:<em>bar should render as italic.</em></p>
|
32
|
+
|
33
|
+
<p>You can use this to draw a line to separate the page:</p>
|
34
|
+
|
35
|
+
<hr />
|
36
|
+
|
37
|
+
<p>You can use lists, start it at the first column for now, please…</p>
|
38
|
+
|
39
|
+
<p>unnumbered lists are like</p>
|
40
|
+
|
41
|
+
<ul>
|
42
|
+
<li>item a</li>
|
43
|
+
<li>item b</li>
|
44
|
+
<li><strong>bold item c</strong></li>
|
45
|
+
</ul>
|
46
|
+
<p>blank space is also permitted before lists like:</p>
|
47
|
+
|
48
|
+
<ul>
|
49
|
+
<li>item a</li>
|
50
|
+
<li>item b</li>
|
51
|
+
<li>item c</li>
|
52
|
+
<ul>
|
53
|
+
<li>item c.a</li>
|
54
|
+
</ul>
|
55
|
+
</ul>
|
56
|
+
<p>or you can number them</p>
|
57
|
+
|
58
|
+
<ol>
|
59
|
+
<li><a href="item 1">item 1</a></li>
|
60
|
+
<li>item 2</li>
|
61
|
+
<li><em> italic item 3 </em></li>
|
62
|
+
<ol>
|
63
|
+
<li>item 3.1</li>
|
64
|
+
<li>item 3.2</li>
|
65
|
+
</ol>
|
66
|
+
</ol>
|
67
|
+
<p>up to five levels</p>
|
68
|
+
|
69
|
+
<ul>
|
70
|
+
<li>1</li>
|
71
|
+
<ul>
|
72
|
+
<li>2</li>
|
73
|
+
<ul>
|
74
|
+
<li>3</li>
|
75
|
+
<ul>
|
76
|
+
<li>4</li>
|
77
|
+
<ul>
|
78
|
+
<li>5</li>
|
79
|
+
</ul>
|
80
|
+
</ul>
|
81
|
+
</ul>
|
82
|
+
</ul>
|
83
|
+
</ul>
|
84
|
+
<ul>
|
85
|
+
<li>You can have
|
86
|
+
multiline list items</li>
|
87
|
+
<li>this is a second multiline
|
88
|
+
list item</li>
|
89
|
+
</ul>
|
90
|
+
<p>You can use nowiki syntax if you would like do stuff like this:</p>
|
91
|
+
|
92
|
+
<pre>
|
93
|
+
Guitar Chord C:
|
94
|
+
|
95
|
+
||---|---|---|
|
96
|
+
||-1-|---|---|
|
97
|
+
||---|---|---|
|
98
|
+
||---|-2-|---|
|
99
|
+
||---|---|-3-|
|
100
|
+
||---|---|---|
|
101
|
+
</pre>
|
102
|
+
|
103
|
+
<p>You can also use it inline nowiki <tt> in a sentence </tt> like this.</p>
|
104
|
+
|
105
|
+
<h1>Escapes</h1>
|
106
|
+
|
107
|
+
<p>Normal Link: <a href="http://wikicreole.org">http://wikicreole.org</a> - now same link, but escaped: http://wikicreole.org</p>
|
108
|
+
|
109
|
+
<p>Normal asterisks: **not bold**</p>
|
110
|
+
|
111
|
+
<p>a tilde alone: ~</p>
|
112
|
+
|
113
|
+
<p>a tilde escapes itself: ~xxx</p>
|
114
|
+
|
115
|
+
<p>Tables are done like this:</p>
|
116
|
+
|
117
|
+
<table>
|
118
|
+
<tr>
|
119
|
+
<th>header col1</th>
|
120
|
+
<th>header col2</th>
|
121
|
+
</tr>
|
122
|
+
<tr>
|
123
|
+
<td>col1</td>
|
124
|
+
<td>col2</td>
|
125
|
+
</tr>
|
126
|
+
<tr>
|
127
|
+
<td>you</td>
|
128
|
+
<td>can</td>
|
129
|
+
</tr>
|
130
|
+
<tr>
|
131
|
+
<td>also</td>
|
132
|
+
<td>align<br /> it.</td>
|
133
|
+
</tr>
|
134
|
+
</table>
|
135
|
+
|
136
|
+
<p>You can format an address by simply forcing linebreaks:</p>
|
137
|
+
|
138
|
+
<p>My contact dates:<br />
|
139
|
+
Pone: xyz<br />
|
140
|
+
Fax: +45<br />
|
141
|
+
Mobile: abc</p>
|
142
|
+
|
143
|
+
<table>
|
144
|
+
<tr>
|
145
|
+
<th>Header title</th>
|
146
|
+
<th>Another header title</th>
|
147
|
+
</tr>
|
148
|
+
<tr>
|
149
|
+
<td><tt> //not italic text// </tt></td>
|
150
|
+
<td><tt> **not bold text** </tt></td>
|
151
|
+
</tr>
|
152
|
+
<tr>
|
153
|
+
<td><em>italic text</em></td>
|
154
|
+
<td><strong> bold text </strong></td>
|
155
|
+
</tr>
|
156
|
+
</table>
|
157
|
+
|
@@ -0,0 +1,100 @@
|
|
1
|
+
= Top-level heading (1)
|
2
|
+
== This a test for creole 0.1 (2)
|
3
|
+
=== This is a Subheading (3)
|
4
|
+
==== Subsub (4)
|
5
|
+
===== Subsubsub (5)
|
6
|
+
|
7
|
+
The ending equal signs should not be displayed:
|
8
|
+
|
9
|
+
= Top-level heading (1) =
|
10
|
+
== This a test for creole 0.1 (2) ==
|
11
|
+
=== This is a Subheading (3) ===
|
12
|
+
==== Subsub (4) ====
|
13
|
+
===== Subsubsub (5) =====
|
14
|
+
|
15
|
+
You can make things **strong** or //em// or **//both//** or //**both**//.
|
16
|
+
|
17
|
+
Character formatting extends across line breaks: **strong,
|
18
|
+
this is still strong. This line deliberately does not end in star-star.
|
19
|
+
|
20
|
+
Not strong. Character formatting does not cross paragraph boundaries.
|
21
|
+
|
22
|
+
Creole1.0 specifies that http://bar and ftp://bar should not render italic,
|
23
|
+
something like foo://bar should render as italic.
|
24
|
+
|
25
|
+
You can use this to draw a line to separate the page:
|
26
|
+
----
|
27
|
+
|
28
|
+
You can use lists, start it at the first column for now, please...
|
29
|
+
|
30
|
+
unnumbered lists are like
|
31
|
+
* item a
|
32
|
+
* item b
|
33
|
+
* **bold item c**
|
34
|
+
|
35
|
+
blank space is also permitted before lists like:
|
36
|
+
* item a
|
37
|
+
* item b
|
38
|
+
* item c
|
39
|
+
** item c.a
|
40
|
+
|
41
|
+
or you can number them
|
42
|
+
# [[item 1]]
|
43
|
+
# item 2
|
44
|
+
# // italic item 3 //
|
45
|
+
## item 3.1
|
46
|
+
## item 3.2
|
47
|
+
|
48
|
+
up to five levels
|
49
|
+
* 1
|
50
|
+
** 2
|
51
|
+
*** 3
|
52
|
+
**** 4
|
53
|
+
***** 5
|
54
|
+
|
55
|
+
* You can have
|
56
|
+
multiline list items
|
57
|
+
* this is a second multiline
|
58
|
+
list item
|
59
|
+
|
60
|
+
You can use nowiki syntax if you would like do stuff like this:
|
61
|
+
|
62
|
+
{{{
|
63
|
+
Guitar Chord C:
|
64
|
+
|
65
|
+
||---|---|---|
|
66
|
+
||-1-|---|---|
|
67
|
+
||---|---|---|
|
68
|
+
||---|-2-|---|
|
69
|
+
||---|---|-3-|
|
70
|
+
||---|---|---|
|
71
|
+
}}}
|
72
|
+
|
73
|
+
You can also use it inline nowiki {{{ in a sentence }}} like this.
|
74
|
+
|
75
|
+
= Escapes =
|
76
|
+
Normal Link: http://wikicreole.org - now same link, but escaped: http:~//wikicreole.org
|
77
|
+
|
78
|
+
Normal asterisks: ~**not bold~**
|
79
|
+
|
80
|
+
a tilde alone: ~
|
81
|
+
|
82
|
+
a tilde escapes itself: ~~xxx
|
83
|
+
|
84
|
+
Tables are done like this:
|
85
|
+
|
86
|
+
|=header col1|=header col2|
|
87
|
+
|col1|col2|
|
88
|
+
|you |can |
|
89
|
+
|also |align\\ it. |
|
90
|
+
|
91
|
+
You can format an address by simply forcing linebreaks:
|
92
|
+
|
93
|
+
My contact dates:\\
|
94
|
+
Pone: xyz\\
|
95
|
+
Fax: +45\\
|
96
|
+
Mobile: abc
|
97
|
+
|
98
|
+
|= Header title |= Another header title |
|
99
|
+
| {{{ //not italic text// }}} | {{{ **not bold text** }}} |
|
100
|
+
| //italic text// | ** bold text ** |
|
@@ -0,0 +1,37 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'test/unit'
|
4
|
+
|
5
|
+
class TC_WikiCreole < Test::Unit::TestCase
|
6
|
+
|
7
|
+
def setup
|
8
|
+
|
9
|
+
# Read the actual library code to get the version and the date
|
10
|
+
code = File.read("lib/wiki_creole.rb")
|
11
|
+
@version_from_code = code.match(/Version:: *(\d+\.\d+\.\d+)/)[1]
|
12
|
+
@date_from_code = code.match(/Date:: *(\d+-\d+-\d+)/)[1]
|
13
|
+
|
14
|
+
# Read the first line of the Changelog to get the version and the date
|
15
|
+
changelog = File.read("Changelog")
|
16
|
+
matches = changelog.match(/^ *(\d+-\d+-\d+) *\((\d+\.\d+\.\d+)\)/)
|
17
|
+
@date_from_changelog = matches[1]
|
18
|
+
@version_from_changelog = matches[2]
|
19
|
+
|
20
|
+
# Read the gemspec file to get the version and the date
|
21
|
+
gemspec = File.read("wikicreole.gemspec")
|
22
|
+
@version_from_gemspec = gemspec.match(/s\.version.*?(\d+\.\d+\.\d+)/)[1]
|
23
|
+
@date_from_gemspec = gemspec.match(/s\.date.*?(\d+-\d+-\d+)/)[1]
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_versions_are_the_same_in_all_files
|
28
|
+
assert_equal @version_from_code, @version_from_changelog
|
29
|
+
assert_equal @version_from_changelog, @version_from_gemspec
|
30
|
+
end
|
31
|
+
|
32
|
+
def test_dates_are_the_same_in_all_files
|
33
|
+
assert_equal @date_from_code, @date_from_changelog
|
34
|
+
assert_equal @date_from_changelog, @date_from_gemspec
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|