remi-maruku 0.5.9
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +73 -0
- data/bin/marudown +29 -0
- data/bin/maruku +176 -0
- data/bin/marutest +338 -0
- data/bin/marutex +31 -0
- data/docs/changelog.md +334 -0
- data/docs/div_syntax.md +36 -0
- data/docs/entity_test.md +23 -0
- data/docs/markdown_syntax.md +899 -0
- data/docs/maruku.md +346 -0
- data/docs/math.md +194 -0
- data/docs/other_stuff.md +51 -0
- data/docs/proposal.md +309 -0
- data/lib/maruku.rb +141 -0
- data/lib/maruku/attributes.rb +227 -0
- data/lib/maruku/defaults.rb +70 -0
- data/lib/maruku/errors_management.rb +92 -0
- data/lib/maruku/ext/div.rb +100 -0
- data/lib/maruku/ext/math.rb +41 -0
- data/lib/maruku/ext/math/elements.rb +27 -0
- data/lib/maruku/ext/math/latex_fix.rb +11 -0
- data/lib/maruku/ext/math/mathml_engines/blahtex.rb +104 -0
- data/lib/maruku/ext/math/mathml_engines/itex2mml.rb +29 -0
- data/lib/maruku/ext/math/mathml_engines/none.rb +20 -0
- data/lib/maruku/ext/math/mathml_engines/ritex.rb +24 -0
- data/lib/maruku/ext/math/parsing.rb +105 -0
- data/lib/maruku/ext/math/to_html.rb +170 -0
- data/lib/maruku/ext/math/to_latex.rb +22 -0
- data/lib/maruku/helpers.rb +260 -0
- data/lib/maruku/input/charsource.rb +326 -0
- data/lib/maruku/input/extensions.rb +69 -0
- data/lib/maruku/input/html_helper.rb +189 -0
- data/lib/maruku/input/linesource.rb +111 -0
- data/lib/maruku/input/parse_block.rb +613 -0
- data/lib/maruku/input/parse_doc.rb +227 -0
- data/lib/maruku/input/parse_span_better.rb +732 -0
- data/lib/maruku/input/rubypants.rb +225 -0
- data/lib/maruku/input/type_detection.rb +144 -0
- data/lib/maruku/input_textile2/t2_parser.rb +163 -0
- data/lib/maruku/maruku.rb +33 -0
- data/lib/maruku/output/s5/fancy.rb +756 -0
- data/lib/maruku/output/s5/to_s5.rb +125 -0
- data/lib/maruku/output/to_html.rb +971 -0
- data/lib/maruku/output/to_latex.rb +563 -0
- data/lib/maruku/output/to_latex_entities.rb +367 -0
- data/lib/maruku/output/to_latex_strings.rb +64 -0
- data/lib/maruku/output/to_markdown.rb +164 -0
- data/lib/maruku/output/to_s.rb +53 -0
- data/lib/maruku/string_utils.rb +191 -0
- data/lib/maruku/structures.rb +165 -0
- data/lib/maruku/structures_inspect.rb +87 -0
- data/lib/maruku/structures_iterators.rb +61 -0
- data/lib/maruku/tests/benchmark.rb +82 -0
- data/lib/maruku/tests/new_parser.rb +370 -0
- data/lib/maruku/tests/tests.rb +136 -0
- data/lib/maruku/textile2.rb +1 -0
- data/lib/maruku/toc.rb +199 -0
- data/lib/maruku/usage/example1.rb +33 -0
- data/lib/maruku/version.rb +40 -0
- data/tests/bugs/code_in_links.md +16 -0
- data/tests/bugs/complex_escaping.md +4 -0
- data/tests/math/syntax.md +46 -0
- data/tests/math_usage/document.md +13 -0
- data/tests/others/abbreviations.md +11 -0
- data/tests/others/blank.md +4 -0
- data/tests/others/code.md +5 -0
- data/tests/others/code2.md +8 -0
- data/tests/others/code3.md +16 -0
- data/tests/others/email.md +4 -0
- data/tests/others/entities.md +19 -0
- data/tests/others/escaping.md +16 -0
- data/tests/others/extra_dl.md +101 -0
- data/tests/others/extra_header_id.md +13 -0
- data/tests/others/extra_table1.md +40 -0
- data/tests/others/footnotes.md +17 -0
- data/tests/others/headers.md +10 -0
- data/tests/others/hrule.md +10 -0
- data/tests/others/images.md +20 -0
- data/tests/others/inline_html.md +42 -0
- data/tests/others/links.md +38 -0
- data/tests/others/list1.md +4 -0
- data/tests/others/list2.md +5 -0
- data/tests/others/list3.md +8 -0
- data/tests/others/lists.md +32 -0
- data/tests/others/lists_after_paragraph.md +44 -0
- data/tests/others/lists_ol.md +39 -0
- data/tests/others/misc_sw.md +105 -0
- data/tests/others/one.md +1 -0
- data/tests/others/paragraphs.md +13 -0
- data/tests/others/sss06.md +352 -0
- data/tests/others/test.md +4 -0
- data/tests/s5/s5profiling.md +48 -0
- data/tests/unittest/abbreviations.md +72 -0
- data/tests/unittest/alt.md +30 -0
- data/tests/unittest/attributes/att2.md +34 -0
- data/tests/unittest/attributes/att3.md +45 -0
- data/tests/unittest/attributes/attributes.md +82 -0
- data/tests/unittest/attributes/circular.md +43 -0
- data/tests/unittest/attributes/default.md +38 -0
- data/tests/unittest/blank.md +39 -0
- data/tests/unittest/blanks_in_code.md +106 -0
- data/tests/unittest/bug_def.md +29 -0
- data/tests/unittest/bug_table.md +67 -0
- data/tests/unittest/code.md +53 -0
- data/tests/unittest/code2.md +46 -0
- data/tests/unittest/code3.md +102 -0
- data/tests/unittest/data_loss.md +42 -0
- data/tests/unittest/divs/div1.md +204 -0
- data/tests/unittest/divs/div2.md +34 -0
- data/tests/unittest/divs/div3_nest.md +62 -0
- data/tests/unittest/easy.md +28 -0
- data/tests/unittest/email.md +33 -0
- data/tests/unittest/encoding/iso-8859-1.md +38 -0
- data/tests/unittest/encoding/utf-8.md +33 -0
- data/tests/unittest/entities.md +124 -0
- data/tests/unittest/escaping.md +89 -0
- data/tests/unittest/extra_dl.md +72 -0
- data/tests/unittest/extra_header_id.md +86 -0
- data/tests/unittest/extra_table1.md +55 -0
- data/tests/unittest/footnotes.md +126 -0
- data/tests/unittest/headers.md +54 -0
- data/tests/unittest/hex_entities.md +50 -0
- data/tests/unittest/hrule.md +60 -0
- data/tests/unittest/html2.md +38 -0
- data/tests/unittest/html3.md +47 -0
- data/tests/unittest/html4.md +42 -0
- data/tests/unittest/html5.md +38 -0
- data/tests/unittest/ie.md +82 -0
- data/tests/unittest/images.md +114 -0
- data/tests/unittest/images2.md +46 -0
- data/tests/unittest/inline_html.md +260 -0
- data/tests/unittest/inline_html2.md +36 -0
- data/tests/unittest/links.md +197 -0
- data/tests/unittest/list1.md +66 -0
- data/tests/unittest/list2.md +76 -0
- data/tests/unittest/list3.md +88 -0
- data/tests/unittest/list4.md +116 -0
- data/tests/unittest/lists.md +241 -0
- data/tests/unittest/lists11.md +31 -0
- data/tests/unittest/lists6.md +54 -0
- data/tests/unittest/lists7.md +79 -0
- data/tests/unittest/lists7b.md +136 -0
- data/tests/unittest/lists8.md +83 -0
- data/tests/unittest/lists9.md +85 -0
- data/tests/unittest/lists_after_paragraph.md +268 -0
- data/tests/unittest/lists_ol.md +324 -0
- data/tests/unittest/loss.md +29 -0
- data/tests/unittest/math/equations.md +69 -0
- data/tests/unittest/math/inline.md +66 -0
- data/tests/unittest/math/math2.md +110 -0
- data/tests/unittest/math/notmath.md +40 -0
- data/tests/unittest/math/table.md +43 -0
- data/tests/unittest/math/table2.md +60 -0
- data/tests/unittest/misc_sw.md +615 -0
- data/tests/unittest/notyet/escape.md +36 -0
- data/tests/unittest/notyet/header_after_par.md +81 -0
- data/tests/unittest/notyet/ticks.md +31 -0
- data/tests/unittest/notyet/triggering.md +206 -0
- data/tests/unittest/olist.md +64 -0
- data/tests/unittest/one.md +28 -0
- data/tests/unittest/paragraph.md +29 -0
- data/tests/unittest/paragraph_rules/dont_merge_ref.md +57 -0
- data/tests/unittest/paragraph_rules/tab_is_blank.md +39 -0
- data/tests/unittest/paragraphs.md +66 -0
- data/tests/unittest/pending/amps.md +29 -0
- data/tests/unittest/pending/empty_cells.md +53 -0
- data/tests/unittest/pending/link.md +103 -0
- data/tests/unittest/recover/recover_links.md +28 -0
- data/tests/unittest/references/long_example.md +88 -0
- data/tests/unittest/references/spaces_and_numbers.md +28 -0
- data/tests/unittest/smartypants.md +171 -0
- data/tests/unittest/syntax_hl.md +80 -0
- data/tests/unittest/table_attributes.md +52 -0
- data/tests/unittest/test.md +32 -0
- data/tests/unittest/wrapping.md +88 -0
- data/tests/unittest/xml.md +54 -0
- data/tests/unittest/xml2.md +34 -0
- data/tests/unittest/xml3.md +44 -0
- data/tests/unittest/xml_instruction.md +72 -0
- data/tests/utf8-files/simple.md +1 -0
- data/unit_test_block.sh +5 -0
- data/unit_test_span.sh +2 -0
- 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><em>Emphasis</em></code></pre>
|
80
|
+
|
81
|
+
<p>Result: <em>Emphasis</em></p>
|
82
|
+
|
83
|
+
<p>Input:</p>
|
84
|
+
|
85
|
+
<pre><code><img src="http://jigsaw.w3.org/css-validator/images/vcss"/></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
|
+
<table>
|
139
|
+
<td markdown="1">This is *true* markdown text. (no par)</td>
|
140
|
+
<td markdown="block">This is *true* markdown text. (par)</td>
|
141
|
+
</tr></pre><pre class='markdown-html-error' style='border: solid 3px red; background-color: pink'>HTML parse error:
|
142
|
+
</table></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><em>Emphasis</em>
|
190
|
+
</code></pre>
|
191
|
+
|
192
|
+
<p>Result: <em>Emphasis</em></p>
|
193
|
+
|
194
|
+
<p>Input:</p>
|
195
|
+
|
196
|
+
<pre><code><img src="http://jigsaw.w3.org/css-validator/images/vcss"/>
|
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'>bill@google.com</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="mailto:bill@google.com">bill@google.com</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
|
+
>
|