remi-maruku 0.5.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (183) hide show
  1. data/Rakefile +73 -0
  2. data/bin/marudown +29 -0
  3. data/bin/maruku +176 -0
  4. data/bin/marutest +338 -0
  5. data/bin/marutex +31 -0
  6. data/docs/changelog.md +334 -0
  7. data/docs/div_syntax.md +36 -0
  8. data/docs/entity_test.md +23 -0
  9. data/docs/markdown_syntax.md +899 -0
  10. data/docs/maruku.md +346 -0
  11. data/docs/math.md +194 -0
  12. data/docs/other_stuff.md +51 -0
  13. data/docs/proposal.md +309 -0
  14. data/lib/maruku.rb +141 -0
  15. data/lib/maruku/attributes.rb +227 -0
  16. data/lib/maruku/defaults.rb +70 -0
  17. data/lib/maruku/errors_management.rb +92 -0
  18. data/lib/maruku/ext/div.rb +100 -0
  19. data/lib/maruku/ext/math.rb +41 -0
  20. data/lib/maruku/ext/math/elements.rb +27 -0
  21. data/lib/maruku/ext/math/latex_fix.rb +11 -0
  22. data/lib/maruku/ext/math/mathml_engines/blahtex.rb +104 -0
  23. data/lib/maruku/ext/math/mathml_engines/itex2mml.rb +29 -0
  24. data/lib/maruku/ext/math/mathml_engines/none.rb +20 -0
  25. data/lib/maruku/ext/math/mathml_engines/ritex.rb +24 -0
  26. data/lib/maruku/ext/math/parsing.rb +105 -0
  27. data/lib/maruku/ext/math/to_html.rb +170 -0
  28. data/lib/maruku/ext/math/to_latex.rb +22 -0
  29. data/lib/maruku/helpers.rb +260 -0
  30. data/lib/maruku/input/charsource.rb +326 -0
  31. data/lib/maruku/input/extensions.rb +69 -0
  32. data/lib/maruku/input/html_helper.rb +189 -0
  33. data/lib/maruku/input/linesource.rb +111 -0
  34. data/lib/maruku/input/parse_block.rb +613 -0
  35. data/lib/maruku/input/parse_doc.rb +227 -0
  36. data/lib/maruku/input/parse_span_better.rb +732 -0
  37. data/lib/maruku/input/rubypants.rb +225 -0
  38. data/lib/maruku/input/type_detection.rb +144 -0
  39. data/lib/maruku/input_textile2/t2_parser.rb +163 -0
  40. data/lib/maruku/maruku.rb +33 -0
  41. data/lib/maruku/output/s5/fancy.rb +756 -0
  42. data/lib/maruku/output/s5/to_s5.rb +125 -0
  43. data/lib/maruku/output/to_html.rb +971 -0
  44. data/lib/maruku/output/to_latex.rb +563 -0
  45. data/lib/maruku/output/to_latex_entities.rb +367 -0
  46. data/lib/maruku/output/to_latex_strings.rb +64 -0
  47. data/lib/maruku/output/to_markdown.rb +164 -0
  48. data/lib/maruku/output/to_s.rb +53 -0
  49. data/lib/maruku/string_utils.rb +191 -0
  50. data/lib/maruku/structures.rb +165 -0
  51. data/lib/maruku/structures_inspect.rb +87 -0
  52. data/lib/maruku/structures_iterators.rb +61 -0
  53. data/lib/maruku/tests/benchmark.rb +82 -0
  54. data/lib/maruku/tests/new_parser.rb +370 -0
  55. data/lib/maruku/tests/tests.rb +136 -0
  56. data/lib/maruku/textile2.rb +1 -0
  57. data/lib/maruku/toc.rb +199 -0
  58. data/lib/maruku/usage/example1.rb +33 -0
  59. data/lib/maruku/version.rb +40 -0
  60. data/tests/bugs/code_in_links.md +16 -0
  61. data/tests/bugs/complex_escaping.md +4 -0
  62. data/tests/math/syntax.md +46 -0
  63. data/tests/math_usage/document.md +13 -0
  64. data/tests/others/abbreviations.md +11 -0
  65. data/tests/others/blank.md +4 -0
  66. data/tests/others/code.md +5 -0
  67. data/tests/others/code2.md +8 -0
  68. data/tests/others/code3.md +16 -0
  69. data/tests/others/email.md +4 -0
  70. data/tests/others/entities.md +19 -0
  71. data/tests/others/escaping.md +16 -0
  72. data/tests/others/extra_dl.md +101 -0
  73. data/tests/others/extra_header_id.md +13 -0
  74. data/tests/others/extra_table1.md +40 -0
  75. data/tests/others/footnotes.md +17 -0
  76. data/tests/others/headers.md +10 -0
  77. data/tests/others/hrule.md +10 -0
  78. data/tests/others/images.md +20 -0
  79. data/tests/others/inline_html.md +42 -0
  80. data/tests/others/links.md +38 -0
  81. data/tests/others/list1.md +4 -0
  82. data/tests/others/list2.md +5 -0
  83. data/tests/others/list3.md +8 -0
  84. data/tests/others/lists.md +32 -0
  85. data/tests/others/lists_after_paragraph.md +44 -0
  86. data/tests/others/lists_ol.md +39 -0
  87. data/tests/others/misc_sw.md +105 -0
  88. data/tests/others/one.md +1 -0
  89. data/tests/others/paragraphs.md +13 -0
  90. data/tests/others/sss06.md +352 -0
  91. data/tests/others/test.md +4 -0
  92. data/tests/s5/s5profiling.md +48 -0
  93. data/tests/unittest/abbreviations.md +72 -0
  94. data/tests/unittest/alt.md +30 -0
  95. data/tests/unittest/attributes/att2.md +34 -0
  96. data/tests/unittest/attributes/att3.md +45 -0
  97. data/tests/unittest/attributes/attributes.md +82 -0
  98. data/tests/unittest/attributes/circular.md +43 -0
  99. data/tests/unittest/attributes/default.md +38 -0
  100. data/tests/unittest/blank.md +39 -0
  101. data/tests/unittest/blanks_in_code.md +106 -0
  102. data/tests/unittest/bug_def.md +29 -0
  103. data/tests/unittest/bug_table.md +67 -0
  104. data/tests/unittest/code.md +53 -0
  105. data/tests/unittest/code2.md +46 -0
  106. data/tests/unittest/code3.md +102 -0
  107. data/tests/unittest/data_loss.md +42 -0
  108. data/tests/unittest/divs/div1.md +204 -0
  109. data/tests/unittest/divs/div2.md +34 -0
  110. data/tests/unittest/divs/div3_nest.md +62 -0
  111. data/tests/unittest/easy.md +28 -0
  112. data/tests/unittest/email.md +33 -0
  113. data/tests/unittest/encoding/iso-8859-1.md +38 -0
  114. data/tests/unittest/encoding/utf-8.md +33 -0
  115. data/tests/unittest/entities.md +124 -0
  116. data/tests/unittest/escaping.md +89 -0
  117. data/tests/unittest/extra_dl.md +72 -0
  118. data/tests/unittest/extra_header_id.md +86 -0
  119. data/tests/unittest/extra_table1.md +55 -0
  120. data/tests/unittest/footnotes.md +126 -0
  121. data/tests/unittest/headers.md +54 -0
  122. data/tests/unittest/hex_entities.md +50 -0
  123. data/tests/unittest/hrule.md +60 -0
  124. data/tests/unittest/html2.md +38 -0
  125. data/tests/unittest/html3.md +47 -0
  126. data/tests/unittest/html4.md +42 -0
  127. data/tests/unittest/html5.md +38 -0
  128. data/tests/unittest/ie.md +82 -0
  129. data/tests/unittest/images.md +114 -0
  130. data/tests/unittest/images2.md +46 -0
  131. data/tests/unittest/inline_html.md +260 -0
  132. data/tests/unittest/inline_html2.md +36 -0
  133. data/tests/unittest/links.md +197 -0
  134. data/tests/unittest/list1.md +66 -0
  135. data/tests/unittest/list2.md +76 -0
  136. data/tests/unittest/list3.md +88 -0
  137. data/tests/unittest/list4.md +116 -0
  138. data/tests/unittest/lists.md +241 -0
  139. data/tests/unittest/lists11.md +31 -0
  140. data/tests/unittest/lists6.md +54 -0
  141. data/tests/unittest/lists7.md +79 -0
  142. data/tests/unittest/lists7b.md +136 -0
  143. data/tests/unittest/lists8.md +83 -0
  144. data/tests/unittest/lists9.md +85 -0
  145. data/tests/unittest/lists_after_paragraph.md +268 -0
  146. data/tests/unittest/lists_ol.md +324 -0
  147. data/tests/unittest/loss.md +29 -0
  148. data/tests/unittest/math/equations.md +69 -0
  149. data/tests/unittest/math/inline.md +66 -0
  150. data/tests/unittest/math/math2.md +110 -0
  151. data/tests/unittest/math/notmath.md +40 -0
  152. data/tests/unittest/math/table.md +43 -0
  153. data/tests/unittest/math/table2.md +60 -0
  154. data/tests/unittest/misc_sw.md +615 -0
  155. data/tests/unittest/notyet/escape.md +36 -0
  156. data/tests/unittest/notyet/header_after_par.md +81 -0
  157. data/tests/unittest/notyet/ticks.md +31 -0
  158. data/tests/unittest/notyet/triggering.md +206 -0
  159. data/tests/unittest/olist.md +64 -0
  160. data/tests/unittest/one.md +28 -0
  161. data/tests/unittest/paragraph.md +29 -0
  162. data/tests/unittest/paragraph_rules/dont_merge_ref.md +57 -0
  163. data/tests/unittest/paragraph_rules/tab_is_blank.md +39 -0
  164. data/tests/unittest/paragraphs.md +66 -0
  165. data/tests/unittest/pending/amps.md +29 -0
  166. data/tests/unittest/pending/empty_cells.md +53 -0
  167. data/tests/unittest/pending/link.md +103 -0
  168. data/tests/unittest/recover/recover_links.md +28 -0
  169. data/tests/unittest/references/long_example.md +88 -0
  170. data/tests/unittest/references/spaces_and_numbers.md +28 -0
  171. data/tests/unittest/smartypants.md +171 -0
  172. data/tests/unittest/syntax_hl.md +80 -0
  173. data/tests/unittest/table_attributes.md +52 -0
  174. data/tests/unittest/test.md +32 -0
  175. data/tests/unittest/wrapping.md +88 -0
  176. data/tests/unittest/xml.md +54 -0
  177. data/tests/unittest/xml2.md +34 -0
  178. data/tests/unittest/xml3.md +44 -0
  179. data/tests/unittest/xml_instruction.md +72 -0
  180. data/tests/utf8-files/simple.md +1 -0
  181. data/unit_test_block.sh +5 -0
  182. data/unit_test_span.sh +2 -0
  183. metadata +243 -0
@@ -0,0 +1,46 @@
1
+ Write a comment here
2
+ *** Parameters: ***
3
+ {} # params
4
+ *** Markdown input: ***
5
+
6
+ This is an ![image][].
7
+
8
+ This is an ![image].
9
+
10
+ [image]: image.jpg
11
+
12
+ *** Output of inspect ***
13
+ md_el(:document,[
14
+ md_par(["This is an ", md_image(["image"], "image"), "."]),
15
+ md_par(["This is an ", md_image(["image"], "image"), "."]),
16
+ md_ref_def("image", "image.jpg", {:title=>nil})
17
+ ],{},[])
18
+ *** Output of to_html ***
19
+ <p>This is an <img src='image.jpg' alt='image' />.</p>
20
+
21
+ <p>This is an <img src='image.jpg' alt='image' />.</p>
22
+ *** Output of to_latex ***
23
+ This is an .
24
+
25
+ This is an .
26
+ *** Output of to_md ***
27
+ This is an image.
28
+
29
+ This is an image.
30
+ *** Output of to_s ***
31
+ This is an image.This is an image.
32
+ *** EOF ***
33
+
34
+
35
+
36
+ OK!
37
+
38
+
39
+
40
+ *** Output of Markdown.pl ***
41
+ <p>This is an <img src="image.jpg" alt="image" />.</p>
42
+
43
+ <p>This is an ![image].</p>
44
+
45
+ *** Output of Markdown.pl (parsed) ***
46
+ Error: #<NoMethodError: undefined method `write_children' for <div> ... </>:REXML::Element>
@@ -0,0 +1,260 @@
1
+ Write a comment abouth the test here.
2
+ *** Parameters: ***
3
+ {:css=>"style.css"}
4
+ *** Markdown input: ***
5
+ CSS: style.css
6
+
7
+ Input:
8
+
9
+ <em>Emphasis</em>
10
+
11
+ Result: <em>Emphasis</em>
12
+
13
+ Input:
14
+
15
+ <img src="http://jigsaw.w3.org/css-validator/images/vcss"/>
16
+
17
+ Result on span: <img src="http://jigsaw.w3.org/css-validator/images/vcss"/>
18
+
19
+ Result alone:
20
+
21
+ <img src="http://jigsaw.w3.org/css-validator/images/vcss"/>
22
+
23
+ Without closing:
24
+
25
+ <img src="http://jigsaw.w3.org/css-validator/images/vcss">
26
+
27
+ <div markdown="1">
28
+ This is *true* markdown text (paragraph)
29
+
30
+ <p markdown="1">
31
+ This is *true* markdown text (no paragraph)
32
+ </p>
33
+ <p markdown="block">
34
+ This is *true* markdown text (block paragraph)
35
+ </p>
36
+ </div>
37
+
38
+ <table>
39
+ <tr>
40
+ <td markdown="1">This is *true* markdown text. (no par)</td>
41
+ <td markdown="block">This is *true* markdown text. (par)</td>
42
+ </tr>
43
+ </table>
44
+
45
+
46
+ The following is invalid HTML, and will generate an error:
47
+
48
+ <table>
49
+ <td markdown="1">This is *true* markdown text. (no par)</td>
50
+ <td markdown="block">This is *true* markdown text. (par)</td>
51
+ </tr>
52
+ </table>
53
+
54
+
55
+ *** Output of inspect ***
56
+ md_el(:document,[
57
+ md_par(["Input:"]),
58
+ md_el(:code,[],{:raw_code=>"<em>Emphasis</em>"},[]),
59
+ md_par(["Result: ", md_html("<em>Emphasis</em>")]),
60
+ md_par(["Input:"]),
61
+ md_el(:code,[],{:raw_code=>"<img src=\"http://jigsaw.w3.org/css-validator/images/vcss\"/>"},[]),
62
+ md_par([
63
+ "Result on span: ",
64
+ md_html("<img src=\"http://jigsaw.w3.org/css-validator/images/vcss\" />")
65
+ ]),
66
+ md_par(["Result alone:"]),
67
+ md_html("<img src=\"http://jigsaw.w3.org/css-validator/images/vcss\" />"),
68
+ md_par(["Without closing:"]),
69
+ md_html("<img src=\"http://jigsaw.w3.org/css-validator/images/vcss\" />"),
70
+ md_html("<div markdown=\"1\">\n\tThis is *true* markdown text (paragraph)\n\n\t<p markdown=\"1\">\n\t\tThis is *true* markdown text (no paragraph)\n\t</p>\n\t<p markdown=\"block\">\n\t\tThis is *true* markdown text (block paragraph)\n\t</p>\n</div>"),
71
+ md_html("<table>\n<tr>\n<td markdown=\"1\">This is *true* markdown text. (no par)</td>\n<td markdown=\"block\">This is *true* markdown text. (par)</td>\n</tr>\n</table>"),
72
+ md_par(["The following is invalid HTML, and will generate an error:"]),
73
+ md_html("<table>\n<td markdown=\"1\">This is *true* markdown text. (no par)</td>\n<td markdown=\"block\">This is *true* markdown text. (par)</td>\n</tr>"),
74
+ md_html("</table>")
75
+ ],{},[])
76
+ *** Output of to_html ***
77
+ <p>Input:</p>
78
+
79
+ <pre><code>&lt;em&gt;Emphasis&lt;/em&gt;</code></pre>
80
+
81
+ <p>Result: <em>Emphasis</em></p>
82
+
83
+ <p>Input:</p>
84
+
85
+ <pre><code>&lt;img src=&quot;http://jigsaw.w3.org/css-validator/images/vcss&quot;/&gt;</code></pre>
86
+
87
+ <p>Result on span: <img src='http://jigsaw.w3.org/css-validator/images/vcss' /></p>
88
+
89
+ <p>Result alone:</p>
90
+ <img src='http://jigsaw.w3.org/css-validator/images/vcss' />
91
+ <p>Without closing:</p>
92
+ <img src='http://jigsaw.w3.org/css-validator/images/vcss' /><div>
93
+ <p>
94
+ <p>This is</p>
95
+ <em>
96
+ <p>true</p>
97
+ </em>
98
+ <p>markdown text (paragraph)</p>
99
+ </p>
100
+ <p>
101
+ <p>
102
+ <p>This is</p>
103
+ <em>
104
+ <p>true</p>
105
+ </em>
106
+ <p>markdown text (no paragraph)</p>
107
+ </p>
108
+ </p>
109
+ <p>
110
+ <p>
111
+ <p>This is</p>
112
+ <em>
113
+ <p>true</p>
114
+ </em>
115
+ <p>markdown text (block paragraph)</p>
116
+ </p>
117
+ </p>
118
+ </div><table>
119
+ <tr>
120
+ <td>
121
+ <p>This is</p>
122
+ <em>
123
+ <p>true</p>
124
+ </em>
125
+ <p>markdown text. (no par)</p>
126
+ </td>
127
+ <td>
128
+ <p>This is</p>
129
+ <em>
130
+ <p>true</p>
131
+ </em>
132
+ <p>markdown text. (par)</p>
133
+ </td>
134
+ </tr>
135
+ </table>
136
+ <p>The following is invalid HTML, and will generate an error:</p>
137
+ <pre class='markdown-html-error' style='border: solid 3px red; background-color: pink'>HTML parse error:
138
+ &lt;table&gt;
139
+ &lt;td markdown=&quot;1&quot;&gt;This is *true* markdown text. (no par)&lt;/td&gt;
140
+ &lt;td markdown=&quot;block&quot;&gt;This is *true* markdown text. (par)&lt;/td&gt;
141
+ &lt;/tr&gt;</pre><pre class='markdown-html-error' style='border: solid 3px red; background-color: pink'>HTML parse error:
142
+ &lt;/table&gt;</pre>
143
+ *** Output of to_latex ***
144
+ Input:
145
+
146
+ \begin{verbatim}<em>Emphasis</em>\end{verbatim}
147
+ Result:
148
+
149
+ Input:
150
+
151
+ \begin{verbatim}<img src="http://jigsaw.w3.org/css-validator/images/vcss"/>\end{verbatim}
152
+ Result on span:
153
+
154
+ Result alone:
155
+
156
+ Without closing:
157
+
158
+ The following is invalid HTML, and will generate an error:
159
+ *** Output of to_md ***
160
+ Input:
161
+
162
+ Result:
163
+
164
+ Input:
165
+
166
+ Result on span:
167
+
168
+ Result alone:
169
+
170
+ Without closing:
171
+
172
+ The following is invalid HTML, and will
173
+ generate an error:
174
+ *** Output of to_s ***
175
+ Input:Result: Input:Result on span: Result alone:Without closing:The following is invalid HTML, and will generate an error:
176
+ *** EOF ***
177
+
178
+
179
+
180
+ OK!
181
+
182
+
183
+
184
+ *** Output of Markdown.pl ***
185
+ <p>CSS: style.css</p>
186
+
187
+ <p>Input:</p>
188
+
189
+ <pre><code>&lt;em&gt;Emphasis&lt;/em&gt;
190
+ </code></pre>
191
+
192
+ <p>Result: <em>Emphasis</em></p>
193
+
194
+ <p>Input:</p>
195
+
196
+ <pre><code>&lt;img src="http://jigsaw.w3.org/css-validator/images/vcss"/&gt;
197
+ </code></pre>
198
+
199
+ <p>Result on span: <img src="http://jigsaw.w3.org/css-validator/images/vcss"/></p>
200
+
201
+ <p>Result alone: </p>
202
+
203
+ <p><img src="http://jigsaw.w3.org/css-validator/images/vcss"/></p>
204
+
205
+ <p>Without closing:</p>
206
+
207
+ <p><img src="http://jigsaw.w3.org/css-validator/images/vcss"></p>
208
+
209
+ <div markdown="1">
210
+ This is *true* markdown text (paragraph)
211
+
212
+ <p markdown="1">
213
+ This is *true* markdown text (no paragraph)
214
+ </p>
215
+ <p markdown="block">
216
+ This is *true* markdown text (block paragraph)
217
+ </p>
218
+ </div>
219
+
220
+ <table>
221
+ <tr>
222
+ <td markdown="1">This is *true* markdown text. (no par)</td>
223
+ <td markdown="block">This is *true* markdown text. (par)</td>
224
+ </tr>
225
+ </table>
226
+
227
+ <p>The following is invalid HTML, and will generate an error:</p>
228
+
229
+ <table>
230
+ <td markdown="1">This is *true* markdown text. (no par)</td>
231
+ <td markdown="block">This is *true* markdown text. (par)</td>
232
+ </tr>
233
+ </table>
234
+
235
+ *** Output of Markdown.pl (parsed) ***
236
+ Error: #<REXML::ParseException: #<REXML::ParseException: Missing end tag for 'img' (got "p")
237
+ Line:
238
+ Position:
239
+ Last 80 unconsumed characters:
240
+ <div markdown="1"> This is *true* markdown text (paragraph) <p markdow>
241
+ /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rexml/parsers/baseparser.rb:320:in `pull'
242
+ /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rexml/parsers/treeparser.rb:21:in `parse'
243
+ /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rexml/document.rb:204:in `build'
244
+ /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rexml/document.rb:42:in `initialize'
245
+ bin/marutest:199:in `new'
246
+ bin/marutest:199:in `run_test'
247
+ bin/marutest:262:in `marutest'
248
+ bin/marutest:259:in `each'
249
+ bin/marutest:259:in `marutest'
250
+ bin/marutest:334
251
+ ...
252
+ Missing end tag for 'img' (got "p")
253
+ Line:
254
+ Position:
255
+ Last 80 unconsumed characters:
256
+ <div markdown="1"> This is *true* markdown text (paragraph) <p markdow
257
+ Line:
258
+ Position:
259
+ Last 80 unconsumed characters:
260
+ <div markdown="1"> This is *true* markdown text (paragraph) <p markdow>
@@ -0,0 +1,36 @@
1
+
2
+ *** Parameters: ***
3
+ {}
4
+ *** Markdown input: ***
5
+ <div markdown="1">Test **bold**</div>
6
+ <p markdown="1">Test **bold**</p>
7
+ *** Output of inspect ***
8
+ md_el(:document,[
9
+ md_html("<div markdown=\"1\">Test **bold**</div>"),
10
+ md_html("<p markdown=\"1\">Test **bold**</p>")
11
+ ],{},[])
12
+ *** Output of to_html ***
13
+ <div>
14
+ <p>Test <strong>bold</strong></p>
15
+ </div><p>Test <strong>bold</strong></p>
16
+ *** Output of to_latex ***
17
+
18
+ *** Output of to_md ***
19
+
20
+ *** Output of to_s ***
21
+
22
+ *** EOF ***
23
+
24
+
25
+
26
+ OK!
27
+
28
+
29
+
30
+ *** Output of Markdown.pl ***
31
+ <div markdown="1">Test **bold**</div>
32
+
33
+ <p markdown="1">Test **bold**</p>
34
+
35
+ *** Output of Markdown.pl (parsed) ***
36
+ Error: #<NoMethodError: undefined method `write_children' for <div> ... </>:REXML::Element>
@@ -0,0 +1,197 @@
1
+ Write a comment abouth the test here.
2
+ *** Parameters: ***
3
+ {:on_error=>:warning}
4
+ *** Markdown input: ***
5
+
6
+ Search on [Google][]
7
+
8
+ Search on [Google] []
9
+
10
+ Search on [Google] [google]
11
+
12
+ Search on [Google] [Google]
13
+
14
+ Search on [Google images][]
15
+
16
+ Inline: [Google images](http://google.com)
17
+
18
+ Inline with title: [Google images](http://google.com "Title")
19
+
20
+ Inline with title: [Google images]( http://google.com "Title" )
21
+
22
+
23
+ Search on <http://www.gogole.com> or <http://Here.com> or ask <mailto:bill@google.com>
24
+ or you might ask bill@google.com.
25
+
26
+ If all else fails, ask [Google](http://www.google.com)
27
+
28
+ [google]: http://www.google.com
29
+
30
+ [google2]: http://www.google.com 'Single quotes'
31
+
32
+ [google3]: http://www.google.com "Double quotes"
33
+
34
+ [google4]: http://www.google.com (Parenthesis)
35
+
36
+ [Google Search]:
37
+ http://www.google.com "Google search"
38
+
39
+ [Google Images]:
40
+ http://images.google.com (Google images)
41
+ *** Output of inspect ***
42
+ md_el(:document,[
43
+ md_par(["Search on ", md_link(["Google"],"google")]),
44
+ md_par(["Search on ", md_link(["Google"],"google")]),
45
+ md_par(["Search on ", md_link(["Google"],"google")]),
46
+ md_par(["Search on ", md_link(["Google"],"google")]),
47
+ md_par(["Search on ", md_link(["Google images"],"google_images")]),
48
+ md_par(["Inline: ", md_im_link(["Google images"], "http://google.com", nil)]),
49
+ md_par([
50
+ "Inline with title: ",
51
+ md_im_link(["Google images"], "http://google.com", "Title")
52
+ ]),
53
+ md_par([
54
+ "Inline with title: ",
55
+ md_im_link(["Google images"], "http://google.com", "Title")
56
+ ]),
57
+ md_par([
58
+ "Search on ",
59
+ md_url("http://www.gogole.com"),
60
+ " or ",
61
+ md_url("http://Here.com"),
62
+ " or ask ",
63
+ md_email("bill@google.com"),
64
+ " or you might ask bill@google.com."
65
+ ]),
66
+ md_par([
67
+ "If all else fails, ask ",
68
+ md_im_link(["Google"], "http://www.google.com", nil)
69
+ ]),
70
+ md_ref_def("google", "http://www.google.com", {:title=>nil}),
71
+ md_ref_def("google2", "http://www.google.com", {:title=>"Single quotes"}),
72
+ md_ref_def("google3", "http://www.google.com", {:title=>"Double quotes"}),
73
+ md_ref_def("google4", "http://www.google.com", {:title=>"Parenthesis"}),
74
+ md_ref_def("google_search", "http://www.google.com", {:title=>"Google search"}),
75
+ md_ref_def("google_images", "http://images.google.com", {:title=>"Google images"})
76
+ ],{},[])
77
+ *** Output of to_html ***
78
+ <p>Search on <a href='http://www.google.com'>Google</a></p>
79
+
80
+ <p>Search on <a href='http://www.google.com'>Google</a></p>
81
+
82
+ <p>Search on <a href='http://www.google.com'>Google</a></p>
83
+
84
+ <p>Search on <a href='http://www.google.com'>Google</a></p>
85
+
86
+ <p>Search on <a href='http://images.google.com' title='Google images'>Google images</a></p>
87
+
88
+ <p>Inline: <a href='http://google.com'>Google images</a></p>
89
+
90
+ <p>Inline with title: <a href='http://google.com' title='Title'>Google images</a></p>
91
+
92
+ <p>Inline with title: <a href='http://google.com' title='Title'>Google images</a></p>
93
+
94
+ <p>Search on <a href='http://www.gogole.com'>http://www.gogole.com</a> or <a href='http://Here.com'>http://Here.com</a> or ask <a href='mailto:bill@google.com'>&#098;&#105;&#108;&#108;&#064;&#103;&#111;&#111;&#103;&#108;&#101;&#046;&#099;&#111;&#109;</a> or you might ask bill@google.com.</p>
95
+
96
+ <p>If all else fails, ask <a href='http://www.google.com'>Google</a></p>
97
+ *** Output of to_latex ***
98
+ Search on \href{http://www.google.com}{Google}
99
+
100
+ Search on \href{http://www.google.com}{Google}
101
+
102
+ Search on \href{http://www.google.com}{Google}
103
+
104
+ Search on \href{http://www.google.com}{Google}
105
+
106
+ Search on \href{http://images.google.com}{Google images}
107
+
108
+ Inline: \href{http://google.com}{Google images}
109
+
110
+ Inline with title: \href{http://google.com}{Google images}
111
+
112
+ Inline with title: \href{http://google.com}{Google images}
113
+
114
+ Search on \href{http://www.gogole.com}{http\char58\char47\char47www\char46gogole\char46com} or \href{http://Here.com}{http\char58\char47\char47Here\char46com} or ask \href{mailto:bill@google.com}{bill\char64google\char46com} or you might ask bill@google.com.
115
+
116
+ If all else fails, ask \href{http://www.google.com}{Google}
117
+ *** Output of to_md ***
118
+ Search on Google
119
+
120
+ Search on Google
121
+
122
+ Search on Google
123
+
124
+ Search on Google
125
+
126
+ Search on Google images
127
+
128
+ Inline: Google images
129
+
130
+ Inline with title: Google images
131
+
132
+ Inline with title: Google images
133
+
134
+ Search on or or ask or you might ask
135
+ bill@google.com.
136
+
137
+ If all else fails, ask Google
138
+ *** Output of to_s ***
139
+ Search on GoogleSearch on GoogleSearch on GoogleSearch on GoogleSearch on Google imagesInline: Google imagesInline with title: Google imagesInline with title: Google imagesSearch on or or ask or you might ask bill@google.com.If all else fails, ask Google
140
+ *** EOF ***
141
+
142
+
143
+
144
+ OK!
145
+
146
+
147
+
148
+ *** Output of Markdown.pl ***
149
+ <p>Search on <a href="http://www.google.com">Google</a></p>
150
+
151
+ <p>Search on <a href="http://www.google.com">Google</a></p>
152
+
153
+ <p>Search on <a href="http://www.google.com">Google</a></p>
154
+
155
+ <p>Search on <a href="http://www.google.com">Google</a></p>
156
+
157
+ <p>Search on <a href="http://images.google.com" title="Google images">Google images</a></p>
158
+
159
+ <p>Inline: <a href="http://google.com">Google images</a></p>
160
+
161
+ <p>Inline with title: <a href="http://google.com" title="Title">Google images</a></p>
162
+
163
+ <p>Inline with title: <a href="http://google.com "Title"">Google images</a></p>
164
+
165
+ <p>Search on <a href="http://www.gogole.com">http://www.gogole.com</a> or <a href="http://Here.com">http://Here.com</a> or ask <a href="&#x6D;&#97;&#x69;&#108;&#116;&#x6F;:&#98;&#105;&#108;l&#64;&#x67;&#x6F;&#x6F;&#103;&#108;&#x65;&#46;c&#x6F;&#x6D;">&#98;&#105;&#108;l&#64;&#x67;&#x6F;&#x6F;&#103;&#108;&#x65;&#46;c&#x6F;&#x6D;</a>
166
+ or you might ask bill@google.com.</p>
167
+
168
+ <p>If all else fails, ask <a href="http://www.google.com">Google</a></p>
169
+
170
+ <p>[google2]: http://www.google.com 'Single quotes'</p>
171
+
172
+ *** Output of Markdown.pl (parsed) ***
173
+ Error: #<REXML::ParseException: #<REXML::ParseException: Missing end tag for 'p' (got "div")
174
+ Line:
175
+ Position:
176
+ Last 80 unconsumed characters:
177
+ >
178
+ /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rexml/parsers/baseparser.rb:320:in `pull'
179
+ /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rexml/parsers/treeparser.rb:21:in `parse'
180
+ /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rexml/document.rb:204:in `build'
181
+ /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rexml/document.rb:42:in `initialize'
182
+ bin/marutest:199:in `new'
183
+ bin/marutest:199:in `run_test'
184
+ bin/marutest:262:in `marutest'
185
+ bin/marutest:259:in `each'
186
+ bin/marutest:259:in `marutest'
187
+ bin/marutest:334
188
+ ...
189
+ Missing end tag for 'p' (got "div")
190
+ Line:
191
+ Position:
192
+ Last 80 unconsumed characters:
193
+
194
+ Line:
195
+ Position:
196
+ Last 80 unconsumed characters:
197
+ >