mediacloth 0.0.3 → 0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +36 -0
- data/lib/mediacloth/mediawikiast.rb +58 -1
- data/lib/mediacloth/mediawikihtmlgenerator.rb +229 -73
- data/lib/mediacloth/mediawikilexer.rb +1030 -656
- data/lib/mediacloth/mediawikilinkhandler.rb +89 -0
- data/lib/mediacloth/mediawikiparams.rb +1 -10
- data/lib/mediacloth/mediawikiparser.rb +939 -409
- data/lib/mediacloth/mediawikiparser.tab.rb +1357 -0
- data/lib/mediacloth/mediawikiparser.y +256 -52
- data/lib/mediacloth/mediawikisignedwikigenerator.rb +42 -0
- data/lib/mediacloth/mediawikitemplatehandler.rb +8 -0
- data/lib/mediacloth/mediawikiwalker.rb +72 -1
- data/lib/mediacloth.rb +33 -10
- data/test/data/ast1 +68 -0
- data/test/data/ast10 +196 -0
- data/test/data/ast11 +34 -0
- data/test/data/ast12 +39 -0
- data/test/data/ast13 +25 -0
- data/test/data/ast14 +13 -0
- data/test/data/ast15 +25 -0
- data/test/data/ast16 +17 -0
- data/test/data/ast17 +9 -0
- data/test/data/ast18 +21 -0
- data/test/data/ast19 +32 -0
- data/test/data/ast2 +4 -0
- data/test/data/ast20 +10 -0
- data/test/data/ast21 +27 -0
- data/test/data/ast22 +22 -0
- data/test/data/ast23 +5 -0
- data/test/data/ast3 +6 -0
- data/test/data/ast4 +122 -0
- data/test/data/ast5 +122 -0
- data/test/data/ast6 +22 -0
- data/test/data/ast7 +143 -0
- data/test/data/ast8 +3 -0
- data/test/data/ast9 +11 -0
- data/test/data/html1 +33 -5
- data/test/data/html10 +31 -27
- data/test/data/html11 +19 -0
- data/test/data/html12 +32 -0
- data/test/data/html13 +29 -0
- data/test/data/html14 +4 -0
- data/test/data/html15 +29 -0
- data/test/data/html16 +28 -0
- data/test/data/html17 +10 -0
- data/test/data/html18 +8 -0
- data/test/data/html19 +27 -0
- data/test/data/html2 +1 -1
- data/test/data/html20 +7 -0
- data/test/data/html21 +5 -0
- data/test/data/html22 +24 -0
- data/test/data/html23 +7 -0
- data/test/data/html3 +1 -1
- data/test/data/html4 +60 -11
- data/test/data/html5 +45 -6
- data/test/data/html6 +5 -5
- data/test/data/html7 +59 -1
- data/test/data/html8 +1 -1
- data/test/data/html9 +10 -2
- data/test/data/input1 +4 -0
- data/test/data/input11 +19 -0
- data/test/data/input12 +32 -0
- data/test/data/input13 +10 -0
- data/test/data/input14 +8 -0
- data/test/data/input15 +10 -0
- data/test/data/input16 +28 -0
- data/test/data/input17 +10 -0
- data/test/data/input18 +16 -0
- data/test/data/input19 +29 -0
- data/test/data/input20 +8 -0
- data/test/data/input21 +18 -0
- data/test/data/input22 +20 -0
- data/test/data/input23 +8 -0
- data/test/data/input4 +13 -1
- data/test/data/input5 +45 -4
- data/test/data/input7 +25 -1
- data/test/data/lex1 +17 -18
- data/test/data/lex10 +57 -87
- data/test/data/lex11 +18 -0
- data/test/data/lex12 +32 -0
- data/test/data/lex13 +3 -0
- data/test/data/lex14 +1 -0
- data/test/data/lex15 +3 -0
- data/test/data/lex16 +27 -0
- data/test/data/lex17 +9 -0
- data/test/data/lex18 +4 -0
- data/test/data/lex19 +27 -0
- data/test/data/lex2 +2 -2
- data/test/data/lex20 +7 -0
- data/test/data/lex21 +4 -0
- data/test/data/lex22 +3 -0
- data/test/data/lex23 +7 -0
- data/test/data/lex3 +1 -1
- data/test/data/lex4 +35 -29
- data/test/data/lex5 +57 -18
- data/test/data/lex6 +7 -7
- data/test/data/lex7 +42 -18
- data/test/data/lex8 +1 -1
- data/test/data/lex9 +6 -6
- data/test/dataproducers/ast.rb +24 -0
- data/test/dataproducers/html.rb +11 -12
- data/test/dataproducers/lex.rb +9 -4
- data/test/debugwalker.rb +25 -11
- data/test/htmlgenerator.rb +170 -13
- data/test/lexer.rb +626 -83
- data/test/linkhandler.rb +39 -0
- data/test/parser.rb +176 -9
- data/test/signedwikigenerator.rb +113 -0
- metadata +158 -79
- data/README +0 -37
- data/lib/mediacloth/mediawikilexer.rb~ +0 -491
- data/lib/mediacloth/mediawikiparser.y~ +0 -210
- data/test/data/result1 +0 -48
- data/test/dataproducers/html.rb~ +0 -24
- data/test/dataproducers/lex.rb~ +0 -15
data/test/data/html14
ADDED
data/test/data/html15
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
<div class="wikitoc">
|
2
|
+
<div class="wikitoctitle">Contents</div>
|
3
|
+
<ul>
|
4
|
+
<li><a href='#Headline1'><span class="wikitocnumber">1.</span><span class="wikitoctext">Headline1</span></a>
|
5
|
+
<ul>
|
6
|
+
<li><a href='#Sub_Headline_1a'><span class="wikitocnumber">1.1.</span><span class="wikitoctext">Sub Headline 1a</span></a>
|
7
|
+
<li><a href='#Sub_Headline_1b'><span class="wikitocnumber">1.2.</span><span class="wikitoctext">Sub Headline 1b</span></a>
|
8
|
+
</ul>
|
9
|
+
<li><a href='#Headline2'><span class="wikitocnumber">2.</span><span class="wikitoctext">Headline2</span></a>
|
10
|
+
<ul>
|
11
|
+
<li><a href='#Sub_Headline_2a'><span class="wikitocnumber">2.1.</span><span class="wikitoctext">Sub Headline 2a</span></a>
|
12
|
+
<ul>
|
13
|
+
<li><a href='#Sub_Sub_Headline_2i'><span class="wikitocnumber">2.1.1.</span><span class="wikitoctext">Sub Sub Headline <i>2i</i></span></a>
|
14
|
+
<li><a href='#Sub_Sub_Headline_2ii'><span class="wikitocnumber">2.1.2.</span><span class="wikitoctext">Sub Sub Headline <b>2ii</b></span></a>
|
15
|
+
</ul>
|
16
|
+
<li><a href='#Sub_Headline_2b'><span class="wikitocnumber">2.2.</span><span class="wikitoctext">Sub Headline 2b</span></a>
|
17
|
+
</ul>
|
18
|
+
</ul>
|
19
|
+
</div>
|
20
|
+
<p><br />
|
21
|
+
|
22
|
+
</p><h2><a name='Headline1'></a> Headline1 </h2>
|
23
|
+
<h3><a name='Sub_Headline_1a'></a> Sub Headline 1a </h3>
|
24
|
+
<h3><a name='Sub_Headline_1b'></a> Sub Headline 1b </h3>
|
25
|
+
<h2><a name='Headline2'></a> Headline2 </h2>
|
26
|
+
<h3><a name='Sub_Headline_2a'></a> Sub Headline 2a </h3>
|
27
|
+
<h4><a name='Sub_Sub_Headline_2i'></a> Sub Sub Headline <i>2i</i> </h4>
|
28
|
+
<h4><a name='Sub_Sub_Headline_2ii'></a> Sub Sub Headline <b>2ii</b> </h4>
|
29
|
+
<h3><a name='Sub_Headline_2b'></a> Sub Headline 2b </h3>
|
data/test/data/html16
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
<h2><a name='Section'></a> Section </h2>
|
2
|
+
<p>Some text.
|
3
|
+
|
4
|
+
</p><pre class="indent"><?xml version="1.0" encoding="UTF-8"?>
|
5
|
+
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "<a href="http://www.apple.com/DTDs/PropertyList-1.0.dtd">http://www.apple.com/DTDs/PropertyList-1.0.dtd</a>">
|
6
|
+
<plist version="1.0">
|
7
|
+
<dict>
|
8
|
+
<key>Label</key>
|
9
|
+
<string>Update svn repo</string>
|
10
|
+
<key>ProgramArguments</key>
|
11
|
+
<array>
|
12
|
+
<string>updatesvn.sh</string>
|
13
|
+
</array>
|
14
|
+
<key>StandardErrorPath</key>
|
15
|
+
<string>/dev/null</string>
|
16
|
+
<key>StandardOutPath</key>
|
17
|
+
<string>/dev/null</string>
|
18
|
+
<key>StartCalendarInterval</key>
|
19
|
+
<dict>
|
20
|
+
<key>Hour</key>
|
21
|
+
<integer>16</integer>
|
22
|
+
<key>Minute</key>
|
23
|
+
<integer>40</integer>
|
24
|
+
</dict>
|
25
|
+
</dict>
|
26
|
+
</plist>
|
27
|
+
</pre><p>
|
28
|
+
Some text.<br />Some other text.<br />Foo.<hr /><img src="foo" /></p>
|
data/test/data/html17
ADDED
data/test/data/html18
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
<h2><a name='Foobar'></a> Foobar </h2>
|
2
|
+
<table border="1px" cellpadding="5"><tr><th>test
|
3
|
+
</th></tr>
|
4
|
+
<tr><td>a
|
5
|
+
</td></tr>
|
6
|
+
</table>
|
7
|
+
<h2><a name='Foobar'></a> Foobar </h2>
|
8
|
+
<table border="1px"><thead><tr><th>test</th></tr></thead><tbody><tr><td>a</td></tr></tbody></table>
|
data/test/data/html19
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
<pre>
|
2
|
+
foo bar
|
3
|
+
</pre><p><code>
|
4
|
+
foo bar
|
5
|
+
</code>
|
6
|
+
|
7
|
+
</p><p> hi <br /> bye</p><p><br />
|
8
|
+
|
9
|
+
</p><p>test <br/> test
|
10
|
+
|
11
|
+
</p><p>There's something important in this example: <code>int a = <b>2</b>+2;</code> but I don't know what.
|
12
|
+
|
13
|
+
</p><p>
|
14
|
+
There's something important in this example: <code>int a = 2+2;<br />
|
15
|
+
|
16
|
+
int b = a + 2;
|
17
|
+
</code> but I don't know what.
|
18
|
+
|
19
|
+
</p><pre>
|
20
|
+
Here's some code:
|
21
|
+
|
22
|
+
<code>
|
23
|
+
int a = 2+2;
|
24
|
+
|
25
|
+
int b = 3+4;
|
26
|
+
</code>
|
27
|
+
</pre>
|
data/test/data/html2
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
<hr
|
1
|
+
<hr/><p>
|
2
2
|
This is a text</p>
|
data/test/data/html20
ADDED
data/test/data/html21
ADDED
@@ -0,0 +1,5 @@
|
|
1
|
+
<div class="paste" style="white-space: pre-wrap;">This is '''some''' text pasted from anywhere<br />with<br />new<br />lines<br />and multiple spaces and tabs<br /> and space<br /> and two spaces<br />with some<br /><p attr="xxx" moo="zzz" bar=zzzzz>HTML formatted <a href="foo.bar">text</a> in </p> it.<br /></div><p>
|
2
|
+
|
3
|
+
|
4
|
+
</p><h2><a name='Section'></a> Section </h2>
|
5
|
+
<div class="paste" style="white-space: pre-wrap;">Foo</div>
|
data/test/data/html22
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
<div class="wikitoc">
|
2
|
+
<div class="wikitoctitle">Contents</div>
|
3
|
+
<ul>
|
4
|
+
<li><a href='#Headline1'><span class="wikitocnumber">1.</span><span class="wikitoctext">Headline1</span></a>
|
5
|
+
<ul>
|
6
|
+
<li><a href='#Sub_Headline_1a'><span class="wikitocnumber">1.1.</span><span class="wikitoctext">Sub Headline 1a</span></a>
|
7
|
+
<li><a href='#Sub_Headline_1b'><span class="wikitocnumber">1.2.</span><span class="wikitoctext">Sub Headline 1b</span></a>
|
8
|
+
</ul>
|
9
|
+
<li><a href='#Headline2'><span class="wikitocnumber">2.</span><span class="wikitoctext">Headline2</span></a>
|
10
|
+
<ul>
|
11
|
+
<li><a href='#Sub_Headline_2a'><span class="wikitocnumber">2.1.</span><span class="wikitoctext">Sub Headline 2a</span></a>
|
12
|
+
<li><a href='#Sub_Headline_2b'><span class="wikitocnumber">2.2.</span><span class="wikitoctext">Sub Headline 2b</span></a>
|
13
|
+
</ul>
|
14
|
+
</ul>
|
15
|
+
</div>
|
16
|
+
<p><br />
|
17
|
+
|
18
|
+
</p><p><div><h1><a name='Headline1'></a> Headline1 </h1>
|
19
|
+
<span><h2><a name='Sub_Headline_1a'></a> Sub Headline 1a </h2>
|
20
|
+
</span><h2><a name='Sub_Headline_1b'></a> Sub Headline 1b </h2>
|
21
|
+
</div></p><h1><a name='Headline2'></a> Headline2 </h1>
|
22
|
+
<table><tr><td><h2><a name='Sub_Headline_2a'></a> Sub Headline 2a </h2>
|
23
|
+
</td><td><h2><a name='Sub_Headline_2b'></a> Sub Headline 2b </h2>
|
24
|
+
</td></tr></table>
|
data/test/data/html23
ADDED
data/test/data/html3
CHANGED
@@ -1 +1 @@
|
|
1
|
-
<p>--Sat Jan 01 01:01:
|
1
|
+
<p>--Sat Jan 01, 2000 01:01<a href="javascript:void(0)">Creator</a><a href="javascript:void(0)">Creator</a> Sat Jan 01, 2000 01:01</p>
|
data/test/data/html4
CHANGED
@@ -1,11 +1,60 @@
|
|
1
|
-
<p>Test mixing of bold and italic formatting
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
</
|
10
|
-
|
11
|
-
</
|
1
|
+
<p>Test mixing of bold and italic formatting:
|
2
|
+
|
3
|
+
</p><p><i>italic<b>bold</b>italic</i>
|
4
|
+
|
5
|
+
</p><p><b>bold<i>italic</i>bold</b>
|
6
|
+
|
7
|
+
</p><p><i><b>boldalic</b></i>
|
8
|
+
|
9
|
+
</p><p><i>italic<b>bold</b>italic</i><b>bold<i>italic</i>bold</b>
|
10
|
+
|
11
|
+
</p><p>
|
12
|
+
Test bold and italic wrapped around inline links:
|
13
|
+
|
14
|
+
</p><p><i><a href="http://example.com">http://example.com</a></i>
|
15
|
+
|
16
|
+
</p><p><b><a href="http://example.com">http://example.com</a></b>
|
17
|
+
|
18
|
+
</p><p><i><a href="http://example.com">http://example.com</a><b>
|
19
|
+
|
20
|
+
</b></i></p><p><b><a href="http://example.com">http://example.com</a>' is good</b>
|
21
|
+
|
22
|
+
</p><p><i><a href="http://example.com">http://example.com</a>' is good</i>
|
23
|
+
|
24
|
+
</p><p>
|
25
|
+
Test unclosed bold and italic formatting:
|
26
|
+
|
27
|
+
</p><p><i>Some italic and now </i>bold
|
28
|
+
</p><h2><a name='Heading'></a>Heading</h2>
|
29
|
+
<p>Text
|
30
|
+
|
31
|
+
</p><p><i>Some italic and now <b>bold
|
32
|
+
</b></i></p><h2><a name='Heading'></a>Heading</h2>
|
33
|
+
<p>
|
34
|
+
Text
|
35
|
+
|
36
|
+
</p><p><i>Some italic and now <b>bold
|
37
|
+
|
38
|
+
</b></i></p><h2><a name='Heading'></a>Heading</h2>
|
39
|
+
<p><br />
|
40
|
+
|
41
|
+
</p><p>Text
|
42
|
+
|
43
|
+
</p><p><i>Some italic and now <b>bold
|
44
|
+
</b></i></p><ul><li> one
|
45
|
+
</li><li> two
|
46
|
+
</li></ul><p><br />
|
47
|
+
|
48
|
+
</p><p><i>Some italic and now <b>bold
|
49
|
+
|
50
|
+
</b></i></p><p>Text
|
51
|
+
|
52
|
+
</p><p>Invalid and weird sections:
|
53
|
+
</p><h6><a name='===='></a>====</h6>
|
54
|
+
<p>
|
55
|
+
=
|
56
|
+
==
|
57
|
+
</p><h1><a name='='></a>=</h1>
|
58
|
+
<h1><a name='=='></a>==</h1>
|
59
|
+
<h2><a name='='></a>=</h2>
|
60
|
+
<h2><a name='=='></a>==</h2>
|
data/test/data/html5
CHANGED
@@ -1,18 +1,57 @@
|
|
1
|
-
<
|
1
|
+
<p>Unordered lists
|
2
|
+
|
3
|
+
</p><ul><li>A
|
2
4
|
<ul><li>A
|
3
5
|
<ul><li>a
|
4
6
|
</li><li>b
|
5
7
|
<ul><li>a
|
6
8
|
</li></ul></li></ul></li></ul></li><li>B
|
7
9
|
<ul><li>b
|
8
|
-
</li></ul></li></ul><
|
10
|
+
</li></ul></li></ul><ul><li>A
|
11
|
+
</li><li>B
|
12
|
+
</li><li></li></ul><p>
|
13
|
+
Ordered lists
|
14
|
+
|
15
|
+
</p><ol><li>a
|
9
16
|
<ol><li>a
|
10
17
|
<ol><li>a
|
11
18
|
<ol><li>a
|
12
19
|
</li></ol></li></ol></li></ol></li><li>a
|
13
20
|
<ol><li>aa
|
14
|
-
</li></ol></li></ol><
|
15
|
-
</li><li>B
|
16
|
-
</li><li></li></ul><ol><li>A
|
21
|
+
</li></ol></li></ol><ol><li>A
|
17
22
|
</li><li>B
|
18
|
-
</li><li></li></ol>
|
23
|
+
</li><li></li></ol><p>
|
24
|
+
Mixed lists
|
25
|
+
|
26
|
+
</p><ul><li>a
|
27
|
+
<ol><li>1
|
28
|
+
</li><li>2
|
29
|
+
</li></ol></li><li>b
|
30
|
+
</li></ul><ol><li>a
|
31
|
+
<ul><li>1
|
32
|
+
</li><li>2
|
33
|
+
<ul><li>2
|
34
|
+
</li></ul></li></ul></li><li>b
|
35
|
+
</li></ol><p>
|
36
|
+
Dictionary lists
|
37
|
+
|
38
|
+
</p><dl><dt>d
|
39
|
+
</dt></dl><p><br />
|
40
|
+
|
41
|
+
</p><dl><dd>t
|
42
|
+
</dd></dl><p><br />
|
43
|
+
|
44
|
+
</p><dl><dt>d
|
45
|
+
</dt><dd>t
|
46
|
+
</dd></dl><p><br />
|
47
|
+
|
48
|
+
</p><dl><dt>d
|
49
|
+
</dt><dd>t
|
50
|
+
</dd><dd>t
|
51
|
+
</dd></dl><p><br />
|
52
|
+
|
53
|
+
</p><dl><dt>d
|
54
|
+
</dt><dd>t
|
55
|
+
</dd></dl><dl><dt>d
|
56
|
+
</dt><dd>t
|
57
|
+
</dd></dl><dl><dt>d </dt><dd>t <a href="image:foo.jpg">image:foo.jpg</a></dd></dl>
|
data/test/data/html6
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
<p>This is some text with <b>bold</b> and <i>italic</i> formating.
|
2
2
|
The list is also here:
|
3
|
-
</p><ul><li>List Item 1
|
4
|
-
<ul><li>Sub list item 1
|
5
|
-
</li><li>Sub list item 2
|
6
|
-
</li></ul></li><li>List Item 2
|
3
|
+
</p><ul><li> List Item 1
|
4
|
+
<ul><li> Sub list item 1
|
5
|
+
</li><li> Sub list item 2
|
6
|
+
</li></ul></li><li> List Item 2
|
7
7
|
</li></ul><p>The end
|
8
|
-
</p><hr
|
8
|
+
</p><hr/>
|
data/test/data/html7
CHANGED
@@ -1 +1,59 @@
|
|
1
|
-
<p><a href="http://sun.com">http://sun.com</a
|
1
|
+
<p><a href="http://sun.com">http://sun.com</a>
|
2
|
+
|
3
|
+
</p><p><a href="http://sun.com:80">http://sun.com:80</a>
|
4
|
+
|
5
|
+
</p><p><a href="http://sun.com">http://sun.com</a>
|
6
|
+
|
7
|
+
</p><p><a href="mailto:joe@sun.com">mailto:joe@sun.com</a>
|
8
|
+
|
9
|
+
</p><p><a href="http://sun.com">stars</a>
|
10
|
+
|
11
|
+
</p><p><a href="http://sun.com">stars and moon</a>
|
12
|
+
|
13
|
+
</p><p><a href="http://sun.com">stars and <i>moon</i> and <b>trees</b> and birds</a>
|
14
|
+
|
15
|
+
</p><p><a href="http://sun.com"><tt>sun</tt> and <tt>moon</tt></a>
|
16
|
+
|
17
|
+
</p><p><a href="http://sun.com">sun > moon</a>
|
18
|
+
|
19
|
+
</p><p><a href="javascript:void(0)">sun</a>
|
20
|
+
|
21
|
+
</p><p><a href="javascript:void(0)">All about Sun</a>
|
22
|
+
|
23
|
+
</p><p><a href="image:sun">image:sun</a>
|
24
|
+
|
25
|
+
</p><p><a href="javascript:void(0)">nofollow|All about Sun</a>
|
26
|
+
|
27
|
+
</p><p><a href="javascript:void(0)">nofollow|Sun > Moon</a>
|
28
|
+
|
29
|
+
</p><p><a href="javascript:void(0)">nofollow|<tt>sun</tt> and <tt>moon</tt></a>
|
30
|
+
|
31
|
+
</p><p><a href="image:sun">image:sun</a>
|
32
|
+
|
33
|
+
</p><p><a href="image:sun">image:sun</a>
|
34
|
+
|
35
|
+
</p><p><a href="image:sun">image:sun</a>
|
36
|
+
|
37
|
+
</p><p><a href="image:sun">image:sun</a>
|
38
|
+
|
39
|
+
</p><p><a href="image:sun">image:sun</a>
|
40
|
+
|
41
|
+
</p><p>[]
|
42
|
+
|
43
|
+
</p><p>[ ]
|
44
|
+
|
45
|
+
</p><p>[[]]
|
46
|
+
|
47
|
+
</p><p><a href="javascript:void(0)"> </a>
|
48
|
+
|
49
|
+
</p><p>
|
50
|
+
|
51
|
+
</p><p>
|
52
|
+
|
53
|
+
</p><p>
|
54
|
+
|
55
|
+
</p><p><a href="javascript:void(0)">Category</a>
|
56
|
+
|
57
|
+
</p><p><a href="javascript:void(0)">Category name</a>
|
58
|
+
|
59
|
+
</p><p><a href="javascript:void(0)">Foo</a></p>
|
data/test/data/html8
CHANGED
@@ -1 +1 @@
|
|
1
|
-
<h3> foo </h3>
|
1
|
+
<h3><a name='foo'></a> foo </h3>
|
data/test/data/html9
CHANGED
@@ -1,6 +1,14 @@
|
|
1
|
-
<p>Some examples of wiki escaping
|
1
|
+
<p>Some examples of wiki escaping.
|
2
|
+
|
3
|
+
</p><p>A paragraph with some wiki characters: ''italic'' '''bold''' [[Link]]
|
4
|
+
|
5
|
+
</p><p>An escaped list:
|
2
6
|
|
3
7
|
* one
|
4
8
|
* two
|
5
9
|
* three
|
6
|
-
|
10
|
+
|
11
|
+
|
12
|
+
</p><p>Text escaped in a heading:
|
13
|
+
|
14
|
+
</p><h2><a name='Heading_with____'></a>Heading with '''</h2>
|
data/test/data/input1
CHANGED
@@ -8,6 +8,8 @@ Another one.
|
|
8
8
|
|
9
9
|
This is text with [[Internal Link]] and [http://www.example.com external link].
|
10
10
|
|
11
|
+
http://inline.link/with?at@character
|
12
|
+
|
11
13
|
We can have headlines:
|
12
14
|
|
13
15
|
|
@@ -32,3 +34,5 @@ This is a text after the line.
|
|
32
34
|
|
33
35
|
*foo
|
34
36
|
* foo2
|
37
|
+
|
38
|
+
== There aren't any closing quotes inside this headline's name ==
|
data/test/data/input11
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
==Examples of XHTML markup and escaping of XML characters==
|
2
|
+
|
3
|
+
Here is a <tt>code sample</tt>.
|
4
|
+
|
5
|
+
Another <tt class='code'>code sample</tt>.
|
6
|
+
Another <tt class="code">code sample</tt>.
|
7
|
+
Another <tt class=code>code sample</tt>.
|
8
|
+
|
9
|
+
An example of a <nowiki><tt>code sample</tt></nowiki>.
|
10
|
+
|
11
|
+
Some math:
|
12
|
+
|
13
|
+
1 < 2 & 1 > 0
|
14
|
+
|
15
|
+
And more text.
|
16
|
+
|
17
|
+
* one
|
18
|
+
* two <span>a b
|
19
|
+
c d e f</span>
|
data/test/data/input12
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
one & two
|
2
|
+
1 < 2
|
3
|
+
<lt; is the "lt" symbol
|
4
|
+
1 < 2 & 3 > 2
|
5
|
+
|
6
|
+
this <> that
|
7
|
+
|
8
|
+
{{ref}}
|
9
|
+
|
10
|
+
{{}}
|
11
|
+
|
12
|
+
{{ }}
|
13
|
+
|
14
|
+
{{ref|attr1}}
|
15
|
+
|
16
|
+
{{ref|attr1|attr2|attr3}}
|
17
|
+
|
18
|
+
{{ref with spaces|attr1 with spaces}}
|
19
|
+
|
20
|
+
{{NS:ref}}
|
21
|
+
|
22
|
+
{{NS:ref|attr}}
|
23
|
+
|
24
|
+
{{NS: ref}}
|
25
|
+
|
26
|
+
{{NS: ref|attr}}
|
27
|
+
|
28
|
+
{{ref|{{inner}}}}
|
29
|
+
|
30
|
+
{{ref|{{inner}}|{{inner2}}}}
|
31
|
+
|
32
|
+
{{ref|{{inner|{{subinner}}}}}}
|
data/test/data/input13
ADDED
data/test/data/input14
ADDED
data/test/data/input15
ADDED
data/test/data/input16
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
== Section ==
|
2
|
+
Some text.
|
3
|
+
|
4
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
5
|
+
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
6
|
+
<plist version="1.0">
|
7
|
+
<dict>
|
8
|
+
<key>Label</key>
|
9
|
+
<string>Update svn repo</string>
|
10
|
+
<key>ProgramArguments</key>
|
11
|
+
<array>
|
12
|
+
<string>updatesvn.sh</string>
|
13
|
+
</array>
|
14
|
+
<key>StandardErrorPath</key>
|
15
|
+
<string>/dev/null</string>
|
16
|
+
<key>StandardOutPath</key>
|
17
|
+
<string>/dev/null</string>
|
18
|
+
<key>StartCalendarInterval</key>
|
19
|
+
<dict>
|
20
|
+
<key>Hour</key>
|
21
|
+
<integer>16</integer>
|
22
|
+
<key>Minute</key>
|
23
|
+
<integer>40</integer>
|
24
|
+
</dict>
|
25
|
+
</dict>
|
26
|
+
</plist>
|
27
|
+
|
28
|
+
Some text.<br>Some other text.<br/>Foo.<hr><img src="foo">
|
data/test/data/input17
ADDED
data/test/data/input18
ADDED
data/test/data/input19
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
<pre>
|
2
|
+
foo bar
|
3
|
+
</pre>
|
4
|
+
|
5
|
+
<code>
|
6
|
+
foo bar
|
7
|
+
</code>
|
8
|
+
|
9
|
+
<p> hi <br/> bye</p>
|
10
|
+
|
11
|
+
<nowiki>test <br/> test</nowiki>
|
12
|
+
|
13
|
+
There's something important in this example: <code>int a = '''2'''+2;</code> but I don't know what.
|
14
|
+
|
15
|
+
|
16
|
+
There's something important in this example: <code>int a = 2+2;<br/>
|
17
|
+
|
18
|
+
int b = a + 2;
|
19
|
+
</code> but I don't know what.
|
20
|
+
|
21
|
+
<pre>
|
22
|
+
Here's some code:
|
23
|
+
|
24
|
+
<code>
|
25
|
+
int a = 2+2;
|
26
|
+
|
27
|
+
int b = 3+4;
|
28
|
+
</code>
|
29
|
+
</pre>
|
data/test/data/input20
ADDED
data/test/data/input21
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
<paste>
|
2
|
+
This is '''some''' text pasted from anywhere
|
3
|
+
with
|
4
|
+
new
|
5
|
+
lines
|
6
|
+
and multiple spaces and tabs
|
7
|
+
and space
|
8
|
+
and two spaces
|
9
|
+
with some
|
10
|
+
<p attr="xxx" moo="zzz" bar=zzzzz>HTML formatted <a href="foo.bar">text</a> in </p> it.
|
11
|
+
</paste>
|
12
|
+
<paste></paste>
|
13
|
+
<paste/>
|
14
|
+
|
15
|
+
|
16
|
+
== Section ==
|
17
|
+
|
18
|
+
<paste>Foo</paste>
|