skwp-superredcloth 1.160
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/COPYING +18 -0
- data/README +162 -0
- data/Rakefile +180 -0
- data/ext/superredcloth_scan/extconf.rb +6 -0
- data/ext/superredcloth_scan/superredcloth.h +77 -0
- data/ext/superredcloth_scan/superredcloth_common.rl +63 -0
- data/ext/superredcloth_scan/superredcloth_inline.c +19445 -0
- data/ext/superredcloth_scan/superredcloth_inline.rl +234 -0
- data/ext/superredcloth_scan/superredcloth_scan.c +21138 -0
- data/ext/superredcloth_scan/superredcloth_scan.rl +130 -0
- data/extras/mingw-rbconfig.rb +176 -0
- data/lib/superredcloth.rb +126 -0
- data/lib/superredcloth_scan.so +0 -0
- data/test/code.yml +148 -0
- data/test/definitions.yml +36 -0
- data/test/filter_html.yml +56 -0
- data/test/images.yml +171 -0
- data/test/instiki.yml +61 -0
- data/test/links.yml +161 -0
- data/test/lists.yml +385 -0
- data/test/poignant.yml +64 -0
- data/test/sanitize_html.yml +9 -0
- data/test/table.yml +212 -0
- data/test/test_parser.rb +22 -0
- data/test/textile_hard_breaks.yml +37 -0
- data/test/textism.yml +374 -0
- metadata +81 -0
@@ -0,0 +1,36 @@
|
|
1
|
+
in: |-
|
2
|
+
here is a definition list:
|
3
|
+
|
4
|
+
- yes := no
|
5
|
+
- no:=no
|
6
|
+
- maybe:= yes
|
7
|
+
out: |-
|
8
|
+
<p>here is a definition list:</p>
|
9
|
+
|
10
|
+
<dl>
|
11
|
+
<dt>yes</dt>
|
12
|
+
<dd>no</dd>
|
13
|
+
|
14
|
+
<dt>no</dt>
|
15
|
+
<dd>no</dd>
|
16
|
+
|
17
|
+
<dt>maybe</dt>
|
18
|
+
<dd>yes</dd>
|
19
|
+
</dl>
|
20
|
+
---
|
21
|
+
in: |-
|
22
|
+
here is a long definition
|
23
|
+
|
24
|
+
- some term :=
|
25
|
+
*sweet*
|
26
|
+
yes
|
27
|
+
ok =:
|
28
|
+
- regular term := no
|
29
|
+
out: |-
|
30
|
+
<p>here is a long definition</p>
|
31
|
+
<dl>
|
32
|
+
<dt>some term</dt>
|
33
|
+
<dd><p><strong>sweet</strong></p><p>yes</p><p>ok</p></dd>
|
34
|
+
<dt>regular term</dt>
|
35
|
+
<dd>no</dd>
|
36
|
+
</dl>
|
@@ -0,0 +1,56 @@
|
|
1
|
+
---
|
2
|
+
in: Just a little harmless xss <script src=http://ha.ckers.org/xss.js></script>
|
3
|
+
out: <p>Just a little harmless xss <script src=http://ha.ckers.org/xss.js></script></p>
|
4
|
+
---
|
5
|
+
in: Here's a bad image <img src="JaVaScRiPt:alert('XSS');">
|
6
|
+
out: <p>Here’s a bad image <img src="JaVaScRiPt:alert(‘XSS’);"></p>
|
7
|
+
---
|
8
|
+
in: Just some random > and < characters, but also a <br/> tag.
|
9
|
+
out: <p>Just some random > and < characters, but also a <br/> tag.</p>
|
10
|
+
---
|
11
|
+
in: |-
|
12
|
+
Quotes outside "pre" tags are escaped.
|
13
|
+
|
14
|
+
<a href="test">Tags are completely escaped outside pre tags.</a>
|
15
|
+
|
16
|
+
<pre>
|
17
|
+
<code>
|
18
|
+
# only < and > are escaped inside pre tags. "Quotes" remain.
|
19
|
+
|
20
|
+
<pre>
|
21
|
+
a = 1
|
22
|
+
</pre>
|
23
|
+
|
24
|
+
Bad code here.
|
25
|
+
|
26
|
+
<script language="JavaScript">
|
27
|
+
window.open( "about:blank" );
|
28
|
+
</script>
|
29
|
+
</code>
|
30
|
+
</pre>
|
31
|
+
|
32
|
+
out: |-
|
33
|
+
<p>Quotes outside “pre” tags are escaped.</p>
|
34
|
+
|
35
|
+
|
36
|
+
<p><a href="test">Tags are completely escaped outside pre tags.</a></p>
|
37
|
+
|
38
|
+
|
39
|
+
<pre>
|
40
|
+
<code>
|
41
|
+
# only < and > are escaped inside pre tags. "Quotes" remain.
|
42
|
+
|
43
|
+
<pre>
|
44
|
+
a = 1
|
45
|
+
</pre>
|
46
|
+
|
47
|
+
Bad code here.
|
48
|
+
|
49
|
+
<script language="JavaScript">
|
50
|
+
window.open( "about:blank" );
|
51
|
+
</script>
|
52
|
+
</code>
|
53
|
+
</pre>
|
54
|
+
---
|
55
|
+
in: /me <3 beer
|
56
|
+
out: <p>/me <3 beer</p>
|
data/test/images.yml
ADDED
@@ -0,0 +1,171 @@
|
|
1
|
+
---
|
2
|
+
in: This is an !image.jpg!
|
3
|
+
out: <p>This is an <img src="image.jpg" alt="" /></p>
|
4
|
+
---
|
5
|
+
in: This is an !image.jpg(with alt text)!
|
6
|
+
out: <p>This is an <img src="image.jpg" title="with alt text" alt="with alt text" /></p>
|
7
|
+
---
|
8
|
+
in: This is an !http://example.com/i/image.jpg!
|
9
|
+
out: <p>This is an <img src="http://example.com/i/image.jpg" alt="" /></p>
|
10
|
+
---
|
11
|
+
in: This is an !http://example.com/i/image.jpg#a1!
|
12
|
+
out: <p>This is an <img src="http://example.com/i/image.jpg#a1" alt="" /></p>
|
13
|
+
---
|
14
|
+
in: This is an !image.jpg!.
|
15
|
+
out: <p>This is an <img src="image.jpg" alt="" />.</p>
|
16
|
+
---
|
17
|
+
in: This is an !image.jpg(with alt text)!.
|
18
|
+
out: <p>This is an <img src="image.jpg" title="with alt text" alt="with alt text" />.</p>
|
19
|
+
---
|
20
|
+
in: This is an !http://example.com/i/image.jpg!.
|
21
|
+
out: <p>This is an <img src="http://example.com/i/image.jpg" alt="" />.</p>
|
22
|
+
---
|
23
|
+
in: This is an !http://example.com/i/image.jpg#a1!.
|
24
|
+
out: <p>This is an <img src="http://example.com/i/image.jpg#a1" alt="" />.</p>
|
25
|
+
---
|
26
|
+
in: This is not an image!!!
|
27
|
+
out: <p>This is not an image!!!</p>
|
28
|
+
---
|
29
|
+
in: This is an !http://example.com/i/image.jpg!:#1
|
30
|
+
out: <p>This is an <a href="#1"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
31
|
+
---
|
32
|
+
in: This is an !http://example.com/i/image.jpg!:#a
|
33
|
+
out: <p>This is an <a href="#a"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
34
|
+
---
|
35
|
+
in: This is an !http://example.com/i/image.jpg!:#a1
|
36
|
+
out: <p>This is an <a href="#a1"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
37
|
+
---
|
38
|
+
in: This is an !http://example.com/i/image.jpg!:#a10
|
39
|
+
out: <p>This is an <a href="#a10"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
40
|
+
---
|
41
|
+
in: This is an !http://example.com/i/image.jpg!:index.html
|
42
|
+
out: <p>This is an <a href="index.html"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
43
|
+
---
|
44
|
+
in: This is an !http://example.com/i/image.jpg!:index.html#1
|
45
|
+
out: <p>This is an <a href="index.html#1"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
46
|
+
---
|
47
|
+
in: This is an !http://example.com/i/image.jpg!:index.html#a1
|
48
|
+
out: <p>This is an <a href="index.html#a1"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
49
|
+
---
|
50
|
+
in: This is an !http://example.com/i/image.jpg!:index.html#a10
|
51
|
+
out: <p>This is an <a href="index.html#a10"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
52
|
+
---
|
53
|
+
in: This is an !http://example.com/i/image.jpg!:index.html?foo=bar
|
54
|
+
out: <p>This is an <a href="index.html?foo=bar"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
55
|
+
---
|
56
|
+
in: This is an !http://example.com/i/image.jpg!:index.html?foo=bar#1
|
57
|
+
out: <p>This is an <a href="index.html?foo=bar#1"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
58
|
+
---
|
59
|
+
in: This is an !http://example.com/i/image.jpg!:index.html?foo=bar#a
|
60
|
+
out: <p>This is an <a href="index.html?foo=bar#a"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
61
|
+
---
|
62
|
+
in: This is an !http://example.com/i/image.jpg!:index.html?foo=bar#a1
|
63
|
+
out: <p>This is an <a href="index.html?foo=bar#a1"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
64
|
+
---
|
65
|
+
in: This is an !http://example.com/i/image.jpg!:index.html?foo=bar#a10
|
66
|
+
out: <p>This is an <a href="index.html?foo=bar#a10"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
67
|
+
---
|
68
|
+
in: This is an !http://example.com/i/image.jpg!:http://example.com/
|
69
|
+
out: <p>This is an <a href="http://example.com/"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
70
|
+
---
|
71
|
+
in: This is an !http://example.com/i/image.jpg!:http://example.com/#1
|
72
|
+
out: <p>This is an <a href="http://example.com/#1"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
73
|
+
---
|
74
|
+
in: This is an !http://example.com/i/image.jpg!:http://example.com/#a
|
75
|
+
out: <p>This is an <a href="http://example.com/#a"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
76
|
+
---
|
77
|
+
in: This is an !http://example.com/i/image.jpg!:http://example.com/#a1
|
78
|
+
out: <p>This is an <a href="http://example.com/#a1"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
79
|
+
---
|
80
|
+
in: This is an !http://example.com/i/image.jpg!:http://example.com/#a10
|
81
|
+
out: <p>This is an <a href="http://example.com/#a10"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
82
|
+
---
|
83
|
+
in: This is an !http://example.com/i/image.jpg!:http://example.com/index.html
|
84
|
+
out: <p>This is an <a href="http://example.com/index.html"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
85
|
+
---
|
86
|
+
in: This is an !http://example.com/i/image.jpg!:http://example.com/index.html#1
|
87
|
+
out: <p>This is an <a href="http://example.com/index.html#1"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
88
|
+
---
|
89
|
+
in: This is an !http://example.com/i/image.jpg!:http://example.com/index.html#a
|
90
|
+
out: <p>This is an <a href="http://example.com/index.html#a"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
91
|
+
---
|
92
|
+
in: This is an !http://example.com/i/image.jpg!:http://example.com/index.html#a1
|
93
|
+
out: <p>This is an <a href="http://example.com/index.html#a1"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
94
|
+
---
|
95
|
+
in: This is an !http://example.com/i/image.jpg!:http://example.com/index.html#a10
|
96
|
+
out: <p>This is an <a href="http://example.com/index.html#a10"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
97
|
+
---
|
98
|
+
in: This is an !http://example.com/i/image.jpg!:http://example.com/index.html?foo=bar
|
99
|
+
out: <p>This is an <a href="http://example.com/index.html?foo=bar"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
100
|
+
---
|
101
|
+
in: This is an !http://example.com/i/image.jpg!:http://example.com/index.html?foo=bar#1
|
102
|
+
out: <p>This is an <a href="http://example.com/index.html?foo=bar#1"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
103
|
+
---
|
104
|
+
in: This is an !http://example.com/i/image.jpg!:http://example.com/index.html?foo=bar#a
|
105
|
+
out: <p>This is an <a href="http://example.com/index.html?foo=bar#a"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
106
|
+
---
|
107
|
+
in: This is an !http://example.com/i/image.jpg!:http://example.com/index.html?foo=bar#a1
|
108
|
+
out: <p>This is an <a href="http://example.com/index.html?foo=bar#a1"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
109
|
+
---
|
110
|
+
in: This is an !http://example.com/i/image.jpg!:http://example.com/index.html?foo=bar#a10
|
111
|
+
out: <p>This is an <a href="http://example.com/index.html?foo=bar#a10"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
112
|
+
---
|
113
|
+
in: This is an !http://example.com/i/image.jpg!:http://example.com/index.html?foo=bar&a=b
|
114
|
+
out: <p>This is an <a href="http://example.com/index.html?foo=bar&a=b"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
115
|
+
---
|
116
|
+
in: This is an !http://example.com/i/image.jpg!:http://example.com/index.html?foo=bar&a=b#1
|
117
|
+
out: <p>This is an <a href="http://example.com/index.html?foo=bar&a=b#1"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
118
|
+
---
|
119
|
+
in: This is an !http://example.com/i/image.jpg!:http://example.com/index.html?foo=bar&a=b#a
|
120
|
+
out: <p>This is an <a href="http://example.com/index.html?foo=bar&a=b#a"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
121
|
+
---
|
122
|
+
in: This is an !http://example.com/i/image.jpg!:http://example.com/index.html?foo=bar&a=b#a1
|
123
|
+
out: <p>This is an <a href="http://example.com/index.html?foo=bar&a=b#a1"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
124
|
+
---
|
125
|
+
in: This is an !http://example.com/i/image.jpg!:http://example.com/index.html?foo=bar&a=b#a10
|
126
|
+
out: <p>This is an <a href="http://example.com/index.html?foo=bar&a=b#a10"><img src="http://example.com/i/image.jpg" alt="" /></a></p>
|
127
|
+
---
|
128
|
+
in: This is an !http://example.com/i/image.jpg!:http://example.com/index.html?foo=bar&a=b.
|
129
|
+
out: <p>This is an <a href="http://example.com/index.html?foo=bar&a=b"><img src="http://example.com/i/image.jpg" alt="" /></a>.</p>
|
130
|
+
---
|
131
|
+
in: This is an !http://example.com/i/image.jpg!:http://example.com/index.html?foo=bar&a=b#1.
|
132
|
+
out: <p>This is an <a href="http://example.com/index.html?foo=bar&a=b#1"><img src="http://example.com/i/image.jpg" alt="" /></a>.</p>
|
133
|
+
---
|
134
|
+
in: This is an !http://example.com/i/image.jpg!:http://example.com/index.html?foo=bar&a=b#a.
|
135
|
+
out: <p>This is an <a href="http://example.com/index.html?foo=bar&a=b#a"><img src="http://example.com/i/image.jpg" alt="" /></a>.</p>
|
136
|
+
---
|
137
|
+
in: This is an !http://example.com/i/image.jpg!:http://example.com/index.html?foo=bar&a=b#a1.
|
138
|
+
out: <p>This is an <a href="http://example.com/index.html?foo=bar&a=b#a1"><img src="http://example.com/i/image.jpg" alt="" /></a>.</p>
|
139
|
+
---
|
140
|
+
in: This is an !http://example.com/i/image.jpg!:http://example.com/index.html?foo=bar&a=b#a10.
|
141
|
+
out: <p>This is an <a href="http://example.com/index.html?foo=bar&a=b#a10"><img src="http://example.com/i/image.jpg" alt="" /></a>.</p>
|
142
|
+
---
|
143
|
+
in: This is an !http://example.com/i/image.jpg!:http://example.com/index.html?foo=bar&a=b, but this is not.
|
144
|
+
out: <p>This is an <a href="http://example.com/index.html?foo=bar&a=b"><img src="http://example.com/i/image.jpg" alt="" /></a>, but this is not.</p>
|
145
|
+
---
|
146
|
+
in: This is an !http://example.com/i/image.jpg!:http://example.com/index.html?foo=bar&a=b#1, but this is not.
|
147
|
+
out: <p>This is an <a href="http://example.com/index.html?foo=bar&a=b#1"><img src="http://example.com/i/image.jpg" alt="" /></a>, but this is not.</p>
|
148
|
+
---
|
149
|
+
in: This is an !http://example.com/i/image.jpg!:http://example.com/index.html?foo=bar&a=b#a, but this is not.
|
150
|
+
out: <p>This is an <a href="http://example.com/index.html?foo=bar&a=b#a"><img src="http://example.com/i/image.jpg" alt="" /></a>, but this is not.</p>
|
151
|
+
---
|
152
|
+
in: This is an !http://example.com/i/image.jpg!:http://example.com/index.html?foo=bar&a=b#a1, but this is not.
|
153
|
+
out: <p>This is an <a href="http://example.com/index.html?foo=bar&a=b#a1"><img src="http://example.com/i/image.jpg" alt="" /></a>, but this is not.</p>
|
154
|
+
---
|
155
|
+
in: (This is an !http://example.com/i/image.jpg!:http://example.com/index.html?foo=bar&a=b#a10) This is not.
|
156
|
+
out: <p>(This is an <a href="http://example.com/index.html?foo=bar&a=b#a10"><img src="http://example.com/i/image.jpg" alt="" /></a>) This is not.</p>
|
157
|
+
---
|
158
|
+
in: (This is an !http://example.com/i/image.jpg!:http://example.com/index.html?foo=bar&a=b) This is not.
|
159
|
+
out: <p>(This is an <a href="http://example.com/index.html?foo=bar&a=b"><img src="http://example.com/i/image.jpg" alt="" /></a>) This is not.</p>
|
160
|
+
---
|
161
|
+
in: (This is an !http://example.com/i/image.jpg!:http://example.com/index.html?foo=bar&a=b#1) This is not.
|
162
|
+
out: <p>(This is an <a href="http://example.com/index.html?foo=bar&a=b#1"><img src="http://example.com/i/image.jpg" alt="" /></a>) This is not.</p>
|
163
|
+
---
|
164
|
+
in: (This is an !http://example.com/i/image.jpg!:http://example.com/index.html?foo=bar&a=b#a) This is not.
|
165
|
+
out: <p>(This is an <a href="http://example.com/index.html?foo=bar&a=b#a"><img src="http://example.com/i/image.jpg" alt="" /></a>) This is not.</p>
|
166
|
+
---
|
167
|
+
in: (This is an !http://example.com/i/image.jpg!:http://example.com/index.html?foo=bar&a=b#a1) This is not.
|
168
|
+
out: <p>(This is an <a href="http://example.com/index.html?foo=bar&a=b#a1"><img src="http://example.com/i/image.jpg" alt="" /></a>) This is not.</p>
|
169
|
+
---
|
170
|
+
in: (This is an !http://example.com/i/image.jpg!:http://example.com/index.html?foo=bar&a=b#a10) This is not.
|
171
|
+
out: <p>(This is an <a href="http://example.com/index.html?foo=bar&a=b#a10"><img src="http://example.com/i/image.jpg" alt="" /></a>) This is not.</p>
|
data/test/instiki.yml
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
--- # Bugs filed at http://www.instiki.org/show/BugReports
|
2
|
+
in: |-
|
3
|
+
_Hi, <span class="newWikiWord">Joe Bob<a href="../show/JoeBob">?</a></span>, this should all be in italic!_
|
4
|
+
out: |-
|
5
|
+
<p><em>Hi, <span class="newWikiWord">Joe Bob<a href="../show/JoeBob">?</a></span>, this should all be in italic!</em></p>
|
6
|
+
---
|
7
|
+
in: '*this <span>span</span> is strong*'
|
8
|
+
out: '<p><strong>this <span>span</span> is strong</strong></p>'
|
9
|
+
---
|
10
|
+
in: '*this <span>Camel Thing<a href="../show/CamelThing">?</a></span> is strong*'
|
11
|
+
out: '<p><strong>this <span>Camel Thing<a href="../show/CamelThing">?</a></span> is strong</strong></p>'
|
12
|
+
---
|
13
|
+
in: '_this <span>span</span> is italic_'
|
14
|
+
out: '<p><em>this <span>span</span> is italic</em></p>'
|
15
|
+
---
|
16
|
+
in: '%{color:red}nested span because of <span><span class="newWikiWord">Camel Word<a href="../show/CamelWord">?</a></span></span>%'
|
17
|
+
out: '<p><span style="color:red">nested span because of <span><span class="newWikiWord">Camel Word<a href="../show/CamelWord">?</a></span></span></span></p>'
|
18
|
+
---
|
19
|
+
in: |-
|
20
|
+
h2. Version History
|
21
|
+
|
22
|
+
* "Version
|
23
|
+
0.0":http://www.threewordslong.com/render-0-8-9b.patch - Early version using MD5 hashes.
|
24
|
+
* "Version
|
25
|
+
0.1":http://www.threewordslong.com/chunk-0-1.patch.gz - First cut of new system. Much cleaner.
|
26
|
+
* "Version 0.2":http://www.threewordslong.com/chunk-0-2.patch.gz - Fixed problem with "authors" page and some tests.
|
27
|
+
out: |-
|
28
|
+
<h2>Version History</h2>
|
29
|
+
<ul>
|
30
|
+
<li><a href="http://www.threewordslong.com/render-0-8-9b.patch">Version
|
31
|
+
0.0</a> – Early version using <span class="caps">MD5</span> hashes.</li>
|
32
|
+
<li><a href="http://www.threewordslong.com/chunk-0-1.patch.gz">Version
|
33
|
+
0.1</a> – First cut of new system. Much cleaner.</li>
|
34
|
+
<li><a href="http://www.threewordslong.com/chunk-0-2.patch.gz">Version 0.2</a> – Fixed problem with “authors” page and some tests.</li>
|
35
|
+
</ul>
|
36
|
+
---
|
37
|
+
in: "--richSeymour --whyTheLuckyStiff"
|
38
|
+
out: "<p>—richSeymour—whyTheLuckyStiff</p>"
|
39
|
+
---
|
40
|
+
in: "div(foo). bar\n\nok\n\ndiv(foo).\n here is a test\ndiv(bar). done."
|
41
|
+
out: "<div class=\"foo\">\n\n\t<p>bar</p>\n\n\n\t<p>ok</p>\n\n\n</div>\n\n\t<p>here is a test</p>\n\n\n\t<div class=\"bar\">\n\n\t<p>done.</p>\n\n\n</div>"
|
42
|
+
---
|
43
|
+
in: |-
|
44
|
+
a ==div(foo).== bar
|
45
|
+
|
46
|
+
ok
|
47
|
+
|
48
|
+
div(foo).
|
49
|
+
here is a test
|
50
|
+
div(bar). done.
|
51
|
+
|
52
|
+
out: |-
|
53
|
+
<p>a div(foo). bar</p>
|
54
|
+
<p>ok</p>
|
55
|
+
<div class="foo">
|
56
|
+
<p>here is a test</p>
|
57
|
+
</div>
|
58
|
+
<div class="bar">
|
59
|
+
<p>done.</p>
|
60
|
+
</div>
|
61
|
+
|
data/test/links.yml
ADDED
@@ -0,0 +1,161 @@
|
|
1
|
+
---
|
2
|
+
in: '"link text":#1'
|
3
|
+
out: <p><a href="#1">link text</a></p>
|
4
|
+
---
|
5
|
+
in: '"link text":#a'
|
6
|
+
out: <p><a href="#a">link text</a></p>
|
7
|
+
---
|
8
|
+
in: '"link text":#a1'
|
9
|
+
out: <p><a href="#a1">link text</a></p>
|
10
|
+
---
|
11
|
+
in: '"link text":#a10'
|
12
|
+
out: <p><a href="#a10">link text</a></p>
|
13
|
+
---
|
14
|
+
in: '"link text":index.html'
|
15
|
+
out: <p><a href="index.html">link text</a></p>
|
16
|
+
---
|
17
|
+
in: '"link text":index.html#1'
|
18
|
+
out: <p><a href="index.html#1">link text</a></p>
|
19
|
+
---
|
20
|
+
in: '"link text":index.html#a'
|
21
|
+
out: <p><a href="index.html#a">link text</a></p>
|
22
|
+
---
|
23
|
+
in: '"link text":index.html#a1'
|
24
|
+
out: <p><a href="index.html#a1">link text</a></p>
|
25
|
+
---
|
26
|
+
in: '"link text":index.html#a10'
|
27
|
+
out: <p><a href="index.html#a10">link text</a></p>
|
28
|
+
---
|
29
|
+
in: '"link text":http://example.com/'
|
30
|
+
out: <p><a href="http://example.com/">link text</a></p>
|
31
|
+
---
|
32
|
+
in: '"link text":http://example.com/#1'
|
33
|
+
out: <p><a href="http://example.com/#1">link text</a></p>
|
34
|
+
---
|
35
|
+
in: '"link text":http://example.com/#a'
|
36
|
+
out: <p><a href="http://example.com/#a">link text</a></p>
|
37
|
+
---
|
38
|
+
in: '"link text":http://example.com/#a1'
|
39
|
+
out: <p><a href="http://example.com/#a1">link text</a></p>
|
40
|
+
---
|
41
|
+
in: '"link text":http://example.com/#a10'
|
42
|
+
out: <p><a href="http://example.com/#a10">link text</a></p>
|
43
|
+
---
|
44
|
+
in: '"link text":http://example.com/index.html'
|
45
|
+
out: <p><a href="http://example.com/index.html">link text</a></p>
|
46
|
+
---
|
47
|
+
in: '"link text":http://example.com/index.html#a'
|
48
|
+
out: <p><a href="http://example.com/index.html#a">link text</a></p>
|
49
|
+
---
|
50
|
+
in: '"link text":http://example.com/index.html#1'
|
51
|
+
out: <p><a href="http://example.com/index.html#1">link text</a></p>
|
52
|
+
---
|
53
|
+
in: '"link text":http://example.com/index.html#a1'
|
54
|
+
out: <p><a href="http://example.com/index.html#a1">link text</a></p>
|
55
|
+
---
|
56
|
+
in: '"link text":http://example.com/index.html#a10'
|
57
|
+
out: <p><a href="http://example.com/index.html#a10">link text</a></p>
|
58
|
+
---
|
59
|
+
in: '"link text":http://example.com/?foo=bar'
|
60
|
+
out: <p><a href="http://example.com/?foo=bar">link text</a></p>
|
61
|
+
---
|
62
|
+
in: '"link text":http://example.com/?foo=bar#a'
|
63
|
+
out: <p><a href="http://example.com/?foo=bar#a">link text</a></p>
|
64
|
+
---
|
65
|
+
in: '"link & text":http://example.com/?foo=bar#a'
|
66
|
+
out: <p><a href="http://example.com/?foo=bar#a">link & text</a></p>
|
67
|
+
---
|
68
|
+
in: '"link text":http://example.com/?foo=bar#1'
|
69
|
+
out: <p><a href="http://example.com/?foo=bar#1">link text</a></p>
|
70
|
+
---
|
71
|
+
in: '"link text":http://example.com/?foo=bar#a1'
|
72
|
+
out: <p><a href="http://example.com/?foo=bar#a1">link text</a></p>
|
73
|
+
---
|
74
|
+
in: '"link text":http://example.com/?foo=bar#a10'
|
75
|
+
out: <p><a href="http://example.com/?foo=bar#a10">link text</a></p>
|
76
|
+
---
|
77
|
+
in: '"link text":http://example.com/?foo=bar&a=b'
|
78
|
+
out: <p><a href="http://example.com/?foo=bar&a=b">link text</a></p>
|
79
|
+
---
|
80
|
+
in: '"link text":http://example.com/?foo=bar&a=b#1'
|
81
|
+
out: <p><a href="http://example.com/?foo=bar&a=b#1">link text</a></p>
|
82
|
+
---
|
83
|
+
in: '"link text":http://example.com/?foo=bar&a=b#a'
|
84
|
+
out: <p><a href="http://example.com/?foo=bar&a=b#a">link text</a></p>
|
85
|
+
---
|
86
|
+
in: '"link text":http://example.com/?foo=bar&a=b#a1'
|
87
|
+
out: <p><a href="http://example.com/?foo=bar&a=b#a1">link text</a></p>
|
88
|
+
---
|
89
|
+
in: '"link text":http://example.com/?foo=bar&a=b#a10'
|
90
|
+
out: <p><a href="http://example.com/?foo=bar&a=b#a10">link text</a></p>
|
91
|
+
---
|
92
|
+
in: 'This is a "link":http://example.com/'
|
93
|
+
out: <p>This is a <a href="http://example.com/">link</a></p>
|
94
|
+
---
|
95
|
+
in: 'This is a "link":http://example.com/.'
|
96
|
+
out: <p>This is a <a href="http://example.com/">link</a>.</p>
|
97
|
+
---
|
98
|
+
in: 'This is a "link":http://example.com/index.html.'
|
99
|
+
out: <p>This is a <a href="http://example.com/index.html">link</a>.</p>
|
100
|
+
---
|
101
|
+
in: 'This is a "link":http://example.com/index.html#a.'
|
102
|
+
out: <p>This is a <a href="http://example.com/index.html#a">link</a>.</p>
|
103
|
+
---
|
104
|
+
in: 'This is a "link":http://example.com/index.html#1.'
|
105
|
+
out: <p>This is a <a href="http://example.com/index.html#1">link</a>.</p>
|
106
|
+
---
|
107
|
+
in: 'This is a "link":http://example.com/index.html#a1.'
|
108
|
+
out: <p>This is a <a href="http://example.com/index.html#a1">link</a>.</p>
|
109
|
+
---
|
110
|
+
in: 'This is a "link":http://example.com/index.html#a10.'
|
111
|
+
out: <p>This is a <a href="http://example.com/index.html#a10">link</a>.</p>
|
112
|
+
---
|
113
|
+
in: 'This is a "link":http://example.com/?foo=bar.'
|
114
|
+
out: <p>This is a <a href="http://example.com/?foo=bar">link</a>.</p>
|
115
|
+
---
|
116
|
+
in: 'This is a "link":http://example.com/?foo=bar#1.'
|
117
|
+
out: <p>This is a <a href="http://example.com/?foo=bar#1">link</a>.</p>
|
118
|
+
---
|
119
|
+
in: 'This is a "link":http://example.com/?foo=bar#a.'
|
120
|
+
out: <p>This is a <a href="http://example.com/?foo=bar#a">link</a>.</p>
|
121
|
+
---
|
122
|
+
in: 'This is a "link":http://example.com/?foo=bar#a1.'
|
123
|
+
out: <p>This is a <a href="http://example.com/?foo=bar#a1">link</a>.</p>
|
124
|
+
---
|
125
|
+
in: 'This is a "link":http://example.com/?foo=bar#a10.'
|
126
|
+
out: <p>This is a <a href="http://example.com/?foo=bar#a10">link</a>.</p>
|
127
|
+
---
|
128
|
+
in: 'This is a "link":http://example.com/?foo=bar#a10, but this is not.'
|
129
|
+
out: <p>This is a <a href="http://example.com/?foo=bar#a10">link</a>, but this is not.</p>
|
130
|
+
---
|
131
|
+
in: '(This is a "link":http://example.com/?foo=bar#a10) but this is not.'
|
132
|
+
out: <p>(This is a <a href="http://example.com/?foo=bar#a10">link</a>) but this is not.</p>
|
133
|
+
---
|
134
|
+
in: '"link text(link title)":http://example.com/'
|
135
|
+
out: <p><a href="http://example.com/" title="link title">link text</a></p>
|
136
|
+
# ---
|
137
|
+
# in: '"link text(link title) ":http://example.com/'
|
138
|
+
# out: <p>“link text(link title) “:http://example.com/</p>
|
139
|
+
# comments: this is a real test and should pass
|
140
|
+
---
|
141
|
+
in: '"(link) text(link title)":http://example.com/'
|
142
|
+
out: <p><a href="http://example.com/" class="link" title="link title">text</a></p>
|
143
|
+
comments: link text can not contain parentheses
|
144
|
+
---
|
145
|
+
in: '"Dive Into XML":http://www.xml.com/pub/au/164'
|
146
|
+
out: <p><a href="http://www.xml.com/pub/au/164">Dive Into XML</a></p>
|
147
|
+
---
|
148
|
+
in: '"Lab Exercises":../lab/exercises/exercises.html.'
|
149
|
+
out: <p><a href="../lab/exercises/exercises.html">Lab Exercises</a>.</p>
|
150
|
+
---
|
151
|
+
in: 'Go to "discuss":http://www.dreammoods.com/cgibin/cutecast/cutecast.pl?forum=1&thread=26627 to discuss.'
|
152
|
+
out: <p>Go to <a href="http://www.dreammoods.com/cgibin/cutecast/cutecast.pl?forum=1&thread=26627">discuss</a> to discuss.</p>
|
153
|
+
---
|
154
|
+
in: '* "rubylang":http://www.ruby-lang.org/en/'
|
155
|
+
out: "<ul>\n\t<li><a href=\"http://www.ruby-lang.org/en/\">rubylang</a></li>\n</ul>"
|
156
|
+
---
|
157
|
+
in: 'The ION coding style document found at "IONCodingStyleGuide.doc":http://perforce:8081/@md=d&cd=//&c=82E@//depot/systest/system/main/pub/doc/IONCodingStyleGuide.doc?ac=22 codifies a couple of rules to ensure reasonably consistent code and documentation of libraries in ION. Test text'
|
158
|
+
out: <p>The ION coding style document found at <a href="http://perforce:8081/@md=d&cd=//&c=82E@//depot/systest/system/main/pub/doc/IONCodingStyleGuide.doc?ac=22">IONCodingStyleGuide.doc</a> codifies a couple of rules to ensure reasonably consistent code and documentation of libraries in ION. Test text</p>
|
159
|
+
---
|
160
|
+
in: '"testing":'
|
161
|
+
out: "<p>“testing”:</p>"
|