RedCloth 3.0.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of RedCloth might be problematic. Click here for more details.

@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env ruby
2
+ require 'lib/redcloth'
3
+ require 'yaml'
4
+
5
+ Dir["tests/*.yml"].each do |testfile|
6
+ YAML::load_documents( File.open( testfile ) ) do |doc|
7
+ if doc['in'] and doc['out']
8
+ red = RedCloth.new( doc['in'] )
9
+ html = if testfile =~ /markdown/
10
+ red.to_html( :markdown )
11
+ else
12
+ red.to_html
13
+ end
14
+ puts "---"
15
+ if html == doc['out']
16
+ puts "success: true"
17
+ else
18
+ puts "out: "; p html
19
+ puts "expected: "; p doc['out']
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,105 @@
1
+ ---
2
+ in: 'This is an empty dictionary: @{}@'
3
+ out: '<p>This is an empty dictionary: <code>{}</code></p>'
4
+ ---
5
+ in: |-
6
+ Testing nested pre tags...
7
+
8
+ <pre>
9
+ <code>
10
+ Good code here.
11
+
12
+ <pre>
13
+ a = 1
14
+ </pre>
15
+
16
+ Bad code here.
17
+
18
+ <script language="JavaScript">
19
+ window.open( "about:blank" );
20
+ </script>
21
+ </code>
22
+ </pre>
23
+
24
+ out: |-
25
+ <p>Testing nested pre tags&#8230;</p>
26
+
27
+
28
+ <pre>
29
+ <code>
30
+ Good code here.
31
+
32
+ &lt;pre&gt;
33
+ a = 1
34
+ &lt;/pre&gt;
35
+
36
+ Bad code here.
37
+
38
+ &lt;script language="JavaScript"&gt;
39
+ window.open( "about:blank" );
40
+ &lt;/script&gt;
41
+ </code>
42
+ </pre>
43
+ ---
44
+ in: |-
45
+ <pre>
46
+ *** test
47
+ </pre>
48
+ out: |-
49
+ <pre>
50
+ *** test
51
+ </pre>
52
+ ---
53
+ in: |-
54
+ <notextile>
55
+ *** test
56
+ </notextile>
57
+ out: |-
58
+ *** test
59
+ ---
60
+ in: '*this <span></span> is strong*'
61
+ out: '<p><strong>this <span></span> is strong</strong></p>'
62
+ ---
63
+ in: '*this <span>test</span> is strong*'
64
+ out: '<p><strong>this <span>test</span> is strong</strong></p>'
65
+ ---
66
+ in: <pre class="code"> __inline__</pre>
67
+ out: <pre class="code"> __inline__</pre>
68
+ ---
69
+ in: |-
70
+ * @foo@
71
+ * @bar@
72
+ * and @x@ is also.
73
+ out: "<ul>\n\t<li><code>foo</code></li>\n\t\t<li><code>bar</code></li>\n\t\t<li>and <code>x</code> is also.</li>\n\t</ul>"
74
+ ---
75
+ in: |-
76
+ <pre class="code"> <hello> </pre>
77
+ <pre class="code"> <hello> </pre>
78
+ out: |-
79
+ <pre class="code"> &lt;hello&gt; </pre>
80
+ <pre class="code"> &lt;hello&gt; </pre>
81
+ ---
82
+ in: |
83
+ Test of Markdown-style indented code.
84
+
85
+ a = [1, 2, 3]
86
+ a.each do |x|
87
+ puts "test number", x,
88
+ "and more!"
89
+ end
90
+
91
+ Paragraph 2.
92
+
93
+ Paragraph 3.
94
+ out: |-
95
+ <p>Test of Markdown-style indented code.</p>
96
+
97
+ <pre><code>a = [1, 2, 3]
98
+ a.each do |x|
99
+ puts "test number", x,
100
+ "and more!"
101
+ end</code></pre>
102
+
103
+ <p>Paragraph 2.</p>
104
+
105
+ <p>Paragraph 3.</p>
@@ -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&#38;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&#38;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&#38;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&#38;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&#38;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&#38;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&#38;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&#38;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&#38;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&#38;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&#38;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&#38;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&#38;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&#38;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&#38;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&#38;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&#38;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&#38;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&#38;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&#38;a=b#a10"><img src="http://example.com/i/image.jpg" alt="" /></a>) This is not.</p>
@@ -0,0 +1,37 @@
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
+ * "Version
22
+ 0.0":http://www.threewordslong.com/render-0-8-9b.patch - Early version using MD5 hashes.
23
+ * "Version
24
+ 0.1":http://www.threewordslong.com/chunk-0-1.patch.gz - First cut of new system. Much cleaner.
25
+ * "Version 0.2":http://www.threewordslong.com/chunk-0-2.patch.gz - Fixed problem with "authors" page and some tests.
26
+ out: |-
27
+ <h2>Version History</h2>
28
+ <ul>
29
+ <li><a href="http://www.threewordslong.com/render-0-8-9b.patch">Version
30
+ 0.0</a> &#8211; Early version using <span class="caps">MD5</span> hashes.</li>
31
+ <li><a href="http://www.threewordslong.com/chunk-0-1.patch.gz">Version
32
+ 0.1</a> &#8211; First cut of new system. Much cleaner.</li>
33
+ <li><a href="http://www.threewordslong.com/chunk-0-2.patch.gz">Version 0.2</a> &#8211; Fixed problem with &#8220;authors&#8221; page and some tests.</li>
34
+ </ul>
35
+ ---
36
+ in: "--richSeymour --whyTheLuckyStiff"
37
+ out: "<p>&#8212;richSeymour&#8212;whyTheLuckyStiff</p>"
@@ -0,0 +1,155 @@
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#1'
66
+ out: <p><a href="http://example.com/?foo=bar#1">link text</a></p>
67
+ ---
68
+ in: '"link text":http://example.com/?foo=bar#a1'
69
+ out: <p><a href="http://example.com/?foo=bar#a1">link text</a></p>
70
+ ---
71
+ in: '"link text":http://example.com/?foo=bar#a10'
72
+ out: <p><a href="http://example.com/?foo=bar#a10">link text</a></p>
73
+ ---
74
+ in: '"link text":http://example.com/?foo=bar&a=b'
75
+ out: <p><a href="http://example.com/?foo=bar&#38;a=b">link text</a></p>
76
+ ---
77
+ in: '"link text":http://example.com/?foo=bar&a=b#1'
78
+ out: <p><a href="http://example.com/?foo=bar&#38;a=b#1">link text</a></p>
79
+ ---
80
+ in: '"link text":http://example.com/?foo=bar&a=b#a'
81
+ out: <p><a href="http://example.com/?foo=bar&#38;a=b#a">link text</a></p>
82
+ ---
83
+ in: '"link text":http://example.com/?foo=bar&a=b#a1'
84
+ out: <p><a href="http://example.com/?foo=bar&#38;a=b#a1">link text</a></p>
85
+ ---
86
+ in: '"link text":http://example.com/?foo=bar&a=b#a10'
87
+ out: <p><a href="http://example.com/?foo=bar&#38;a=b#a10">link text</a></p>
88
+ ---
89
+ in: 'This is a "link":http://example.com/'
90
+ out: <p>This is a <a href="http://example.com/">link</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/index.html.'
96
+ out: <p>This is a <a href="http://example.com/index.html">link</a>.</p>
97
+ ---
98
+ in: 'This is a "link":http://example.com/index.html#a.'
99
+ out: <p>This is a <a href="http://example.com/index.html#a">link</a>.</p>
100
+ ---
101
+ in: 'This is a "link":http://example.com/index.html#1.'
102
+ out: <p>This is a <a href="http://example.com/index.html#1">link</a>.</p>
103
+ ---
104
+ in: 'This is a "link":http://example.com/index.html#a1.'
105
+ out: <p>This is a <a href="http://example.com/index.html#a1">link</a>.</p>
106
+ ---
107
+ in: 'This is a "link":http://example.com/index.html#a10.'
108
+ out: <p>This is a <a href="http://example.com/index.html#a10">link</a>.</p>
109
+ ---
110
+ in: 'This is a "link":http://example.com/?foo=bar.'
111
+ out: <p>This is a <a href="http://example.com/?foo=bar">link</a>.</p>
112
+ ---
113
+ in: 'This is a "link":http://example.com/?foo=bar#1.'
114
+ out: <p>This is a <a href="http://example.com/?foo=bar#1">link</a>.</p>
115
+ ---
116
+ in: 'This is a "link":http://example.com/?foo=bar#a.'
117
+ out: <p>This is a <a href="http://example.com/?foo=bar#a">link</a>.</p>
118
+ ---
119
+ in: 'This is a "link":http://example.com/?foo=bar#a1.'
120
+ out: <p>This is a <a href="http://example.com/?foo=bar#a1">link</a>.</p>
121
+ ---
122
+ in: 'This is a "link":http://example.com/?foo=bar#a10.'
123
+ out: <p>This is a <a href="http://example.com/?foo=bar#a10">link</a>.</p>
124
+ ---
125
+ in: 'This is a "link":http://example.com/?foo=bar#a10, but this is not.'
126
+ out: <p>This is a <a href="http://example.com/?foo=bar#a10">link</a>, but this is not.</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: '"link text(link title)":http://example.com/'
132
+ out: <p><a href="http://example.com/" title="link title">link text</a></p>
133
+ # ---
134
+ # in: '"link text(link title) ":http://example.com/'
135
+ # out: <p>&#8220;link text(link title) &#8220;:http://example.com/</p>
136
+ # comments: this is a real test and should pass
137
+ ---
138
+ in: '"(link) text(link title)":http://example.com/'
139
+ out: <p><a href="http://example.com/" class="link" title="link title"> text</a></p>
140
+ comments: link text can not contain parentheses
141
+ ---
142
+ in: '"Dive Into XML":http://www.xml.com/pub/au/164'
143
+ out: <p><a href="http://www.xml.com/pub/au/164">Dive Into <span class="caps">XML</span></a></p>
144
+ ---
145
+ in: '"Lab Exercises":../lab/exercises/exercises.html.'
146
+ out: <p><a href="../lab/exercises/exercises.html">Lab Exercises</a>.</p>
147
+ ---
148
+ in: 'Go to "discuss":http://www.dreammoods.com/cgibin/cutecast/cutecast.pl?forum=1&thread=26627 to discuss.'
149
+ out: <p>Go to <a href="http://www.dreammoods.com/cgibin/cutecast/cutecast.pl?forum=1&#38;thread=26627">discuss</a> to discuss.</p>
150
+ ---
151
+ in: '* "rubylang":http://www.ruby-lang.org/en/'
152
+ out: "<ul>\n\t<li><a href=\"http://www.ruby-lang.org/en/\">rubylang</a></li>\n\t</ul>"
153
+ ---
154
+ 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'
155
+ out: <p>The <span class="caps">ION</span> coding style document found at <a href="http://perforce:8081/@md=d&#38;cd=//&#38;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 <span class="caps">ION</span>. Test text</p>