maruku 0.5.8 → 0.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/maruku +22 -14
- data/lib/maruku/defaults.rb +2 -1
- data/lib/maruku/ext/div.rb +100 -0
- data/lib/maruku/ext/math.rb +1 -1
- data/lib/maruku/ext/math/mathml_engines/blahtex.rb +23 -25
- data/lib/maruku/input/parse_block.rb +4 -3
- data/lib/maruku/input/parse_span_better.rb +9 -4
- data/lib/maruku/input/type_detection.rb +5 -2
- data/lib/maruku/output/to_html.rb +14 -2
- data/lib/maruku/version.rb +1 -1
- data/tests/bugs/abbrev.md +1479 -0
- data/tests/bugs/html.md +29 -0
- data/tests/bugs/links.md +47 -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/email.md +1 -1
- data/tests/unittest/links.md +1 -1
- data/tests/unittest/pending/link.md +3 -3
- metadata +9 -2
data/tests/bugs/html.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
Write a comment here
|
2
|
+
*** Parameters: ***
|
3
|
+
{} # params
|
4
|
+
*** Markdown input: ***
|
5
|
+
a < b
|
6
|
+
|
7
|
+
*** Output of inspect ***
|
8
|
+
md_el(:document,[md_par(["a < b"])],{},[])
|
9
|
+
*** Output of to_html ***
|
10
|
+
<p>a < b</p>
|
11
|
+
*** Output of to_latex ***
|
12
|
+
a {\tt \char60} b
|
13
|
+
*** Output of to_md ***
|
14
|
+
a < b
|
15
|
+
*** Output of to_s ***
|
16
|
+
a < b
|
17
|
+
*** EOF ***
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
OK!
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
*** Output of Markdown.pl ***
|
26
|
+
<p>a < b</p>
|
27
|
+
|
28
|
+
*** Output of Markdown.pl (parsed) ***
|
29
|
+
Error: #<NoMethodError: private method `write_children' called for <div> ... </>:REXML::Element>
|
data/tests/bugs/links.md
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
Write a comment here
|
2
|
+
*** Parameters: ***
|
3
|
+
{} # params
|
4
|
+
*** Markdown input: ***
|
5
|
+
Amazing [Museo].
|
6
|
+
|
7
|
+
[Museo]: <http://www.josbuivenga.demon.nl/museo.html> (Jos Buivenga's Museo free typeface)
|
8
|
+
|
9
|
+
*** Output of inspect ***
|
10
|
+
md_el(:document,[
|
11
|
+
md_par(["Amazing ", md_link(["Museo"],"museo"), "."]),
|
12
|
+
md_ref_def("museo", "http://www.josbuivenga.demon.nl/museo.html", {:title=>"Jos Buivenga"})
|
13
|
+
],{},[])
|
14
|
+
*** Output of to_html ***
|
15
|
+
<p>Amazing <a href='http://www.josbuivenga.demon.nl/museo.html' title='Jos Buivenga'>Museo</a>.</p>
|
16
|
+
*** Output of to_latex ***
|
17
|
+
Amazing \href{http://www.josbuivenga.demon.nl/museo.html>}{Museo}.
|
18
|
+
*** Output of to_md ***
|
19
|
+
Amazing Museo.
|
20
|
+
*** Output of to_s ***
|
21
|
+
Amazing Museo.
|
22
|
+
*** EOF ***
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
Failed tests: [:to_latex]
|
28
|
+
|
29
|
+
*** Output of inspect ***
|
30
|
+
md_el(:document,[
|
31
|
+
md_par(["Amazing ", md_link(["Museo"],"museo"), "."]),
|
32
|
+
md_ref_def("museo", "http://www.josbuivenga.demon.nl/museo.html", {:title=>"Jos Buivenga"})
|
33
|
+
],{},[])
|
34
|
+
*** Output of to_html ***
|
35
|
+
<p>Amazing <a href='http://www.josbuivenga.demon.nl/museo.html' title='Jos Buivenga'>Museo</a>.</p>
|
36
|
+
*** Output of to_latex ***
|
37
|
+
-----| WARNING | -----
|
38
|
+
Amazing \href{http://www.josbuivenga.demon.nl/museo.html}{Museo}.
|
39
|
+
*** Output of to_md ***
|
40
|
+
Amazing Museo.
|
41
|
+
*** Output of to_s ***
|
42
|
+
Amazing Museo.
|
43
|
+
*** Output of Markdown.pl ***
|
44
|
+
<p>Amazing [Museo].</p>
|
45
|
+
|
46
|
+
*** Output of Markdown.pl (parsed) ***
|
47
|
+
Error: #<NoMethodError: private method `write_children' called for <div> ... </>:REXML::Element>
|
@@ -0,0 +1,204 @@
|
|
1
|
+
Write a comment here
|
2
|
+
*** Parameters: ***
|
3
|
+
require 'maruku/ext/div'; {} # params
|
4
|
+
*** Markdown input: ***
|
5
|
+
+---------
|
6
|
+
| text
|
7
|
+
+----------
|
8
|
+
|
9
|
+
+---------
|
10
|
+
|text
|
11
|
+
|
12
|
+
+--
|
13
|
+
text
|
14
|
+
|
15
|
+
=--
|
16
|
+
|
17
|
+
|
18
|
+
+---------
|
19
|
+
| text
|
20
|
+
+----------
|
21
|
+
|
22
|
+
+---------
|
23
|
+
|text
|
24
|
+
|
25
|
+
+--
|
26
|
+
text
|
27
|
+
|
28
|
+
=--
|
29
|
+
|
30
|
+
|
31
|
+
+---------
|
32
|
+
| text
|
33
|
+
+----------
|
34
|
+
|
35
|
+
+---------
|
36
|
+
|text
|
37
|
+
|
38
|
+
+--
|
39
|
+
text
|
40
|
+
|
41
|
+
=--
|
42
|
+
|
43
|
+
+---------
|
44
|
+
| text
|
45
|
+
+----------
|
46
|
+
|
47
|
+
+---------
|
48
|
+
|text
|
49
|
+
|
50
|
+
+--
|
51
|
+
text
|
52
|
+
|
53
|
+
=--
|
54
|
+
|
55
|
+
*** Output of inspect ***
|
56
|
+
md_el(:document,[
|
57
|
+
md_el(:div,[md_par(["text"])],{},[]),
|
58
|
+
md_el(:div,[md_par(["text"])],{},[]),
|
59
|
+
md_el(:div,[md_par(["text"])],{},[]),
|
60
|
+
md_el(:div,[md_par(["text"])],{},[]),
|
61
|
+
md_el(:div,[md_par(["text"])],{},[]),
|
62
|
+
md_el(:div,[md_par(["text"])],{},[]),
|
63
|
+
md_el(:div,[md_par(["text"])],{},[]),
|
64
|
+
md_el(:div,[md_par(["text"])],{},[]),
|
65
|
+
md_el(:div,[md_par(["text"])],{},[]),
|
66
|
+
md_el(:div,[md_par(["text"])],{},[]),
|
67
|
+
md_el(:div,[md_par(["text"])],{},[]),
|
68
|
+
md_el(:div,[md_par(["text"])],{},[])
|
69
|
+
],{},[])
|
70
|
+
*** Output of to_html ***
|
71
|
+
<div>
|
72
|
+
<p>text</p>
|
73
|
+
</div>
|
74
|
+
|
75
|
+
<div>
|
76
|
+
<p>text</p>
|
77
|
+
</div>
|
78
|
+
|
79
|
+
<div>
|
80
|
+
<p>text</p>
|
81
|
+
</div>
|
82
|
+
|
83
|
+
<div>
|
84
|
+
<p>text</p>
|
85
|
+
</div>
|
86
|
+
|
87
|
+
<div>
|
88
|
+
<p>text</p>
|
89
|
+
</div>
|
90
|
+
|
91
|
+
<div>
|
92
|
+
<p>text</p>
|
93
|
+
</div>
|
94
|
+
|
95
|
+
<div>
|
96
|
+
<p>text</p>
|
97
|
+
</div>
|
98
|
+
|
99
|
+
<div>
|
100
|
+
<p>text</p>
|
101
|
+
</div>
|
102
|
+
|
103
|
+
<div>
|
104
|
+
<p>text</p>
|
105
|
+
</div>
|
106
|
+
|
107
|
+
<div>
|
108
|
+
<p>text</p>
|
109
|
+
</div>
|
110
|
+
|
111
|
+
<div>
|
112
|
+
<p>text</p>
|
113
|
+
</div>
|
114
|
+
|
115
|
+
<div>
|
116
|
+
<p>text</p>
|
117
|
+
</div>
|
118
|
+
*** Output of to_latex ***
|
119
|
+
|
120
|
+
*** Output of to_md ***
|
121
|
+
text
|
122
|
+
|
123
|
+
text
|
124
|
+
|
125
|
+
text
|
126
|
+
|
127
|
+
text
|
128
|
+
|
129
|
+
text
|
130
|
+
|
131
|
+
text
|
132
|
+
|
133
|
+
text
|
134
|
+
|
135
|
+
text
|
136
|
+
|
137
|
+
text
|
138
|
+
|
139
|
+
text
|
140
|
+
|
141
|
+
text
|
142
|
+
|
143
|
+
text
|
144
|
+
*** Output of to_s ***
|
145
|
+
texttexttexttexttexttexttexttexttexttexttexttext
|
146
|
+
*** EOF ***
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
OK!
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
*** Output of Markdown.pl ***
|
155
|
+
<p>+---------
|
156
|
+
| text
|
157
|
+
+----------</p>
|
158
|
+
|
159
|
+
<p>+---------
|
160
|
+
|text</p>
|
161
|
+
|
162
|
+
<p>+--
|
163
|
+
text</p>
|
164
|
+
|
165
|
+
<p>=--</p>
|
166
|
+
|
167
|
+
<p>+---------
|
168
|
+
| text
|
169
|
+
+----------</p>
|
170
|
+
|
171
|
+
<p>+---------
|
172
|
+
|text</p>
|
173
|
+
|
174
|
+
<p>+--
|
175
|
+
text</p>
|
176
|
+
|
177
|
+
<p>=--</p>
|
178
|
+
|
179
|
+
<p>+---------
|
180
|
+
| text
|
181
|
+
+----------</p>
|
182
|
+
|
183
|
+
<p>+---------
|
184
|
+
|text</p>
|
185
|
+
|
186
|
+
<p>+--
|
187
|
+
text</p>
|
188
|
+
|
189
|
+
<p>=--</p>
|
190
|
+
|
191
|
+
<p>+---------
|
192
|
+
| text
|
193
|
+
+----------</p>
|
194
|
+
|
195
|
+
<p>+---------
|
196
|
+
|text</p>
|
197
|
+
|
198
|
+
<p>+--
|
199
|
+
text</p>
|
200
|
+
|
201
|
+
<p>=--</p>
|
202
|
+
|
203
|
+
*** Output of Markdown.pl (parsed) ***
|
204
|
+
Error: #<NoMethodError: private method `write_children' called for <div> ... </>:REXML::Element>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
Write a comment here
|
2
|
+
*** Parameters: ***
|
3
|
+
require 'maruku/ext/div'; {} # params
|
4
|
+
*** Markdown input: ***
|
5
|
+
+--
|
6
|
+
ciao
|
7
|
+
=--
|
8
|
+
*** Output of inspect ***
|
9
|
+
md_el(:document,[md_el(:div,[md_par(["ciao"])],{},[])],{},[])
|
10
|
+
*** Output of to_html ***
|
11
|
+
<div>
|
12
|
+
<p>ciao</p>
|
13
|
+
</div>
|
14
|
+
*** Output of to_latex ***
|
15
|
+
|
16
|
+
*** Output of to_md ***
|
17
|
+
ciao
|
18
|
+
*** Output of to_s ***
|
19
|
+
ciao
|
20
|
+
*** EOF ***
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
OK!
|
25
|
+
|
26
|
+
|
27
|
+
|
28
|
+
*** Output of Markdown.pl ***
|
29
|
+
<p>+--
|
30
|
+
ciao
|
31
|
+
=--</p>
|
32
|
+
|
33
|
+
*** Output of Markdown.pl (parsed) ***
|
34
|
+
Error: #<NoMethodError: private method `write_children' called for <div> ... </>:REXML::Element>
|
@@ -0,0 +1,62 @@
|
|
1
|
+
Write a comment here
|
2
|
+
*** Parameters: ***
|
3
|
+
require 'maruku/ext/div'; {} # params
|
4
|
+
*** Markdown input: ***
|
5
|
+
+-----------------------------------{.warning}------
|
6
|
+
| this is the last warning!
|
7
|
+
|
|
8
|
+
| please, go away!
|
9
|
+
|
|
10
|
+
| +------------------------------------- {.menace} --
|
11
|
+
| | or else terrible things will happen
|
12
|
+
| +--------------------------------------------------
|
13
|
+
+---------------------------------------------------
|
14
|
+
*** Output of inspect ***
|
15
|
+
md_el(:document,[
|
16
|
+
md_el(:div,[
|
17
|
+
md_par(["this is the last warning!"]),
|
18
|
+
md_par(["please, go away!"]),
|
19
|
+
md_el(:div,[md_par(["or else terrible things will happen"])],{},[[:class, "menace"]])
|
20
|
+
],{},[[:class, "warning"]])
|
21
|
+
],{},[])
|
22
|
+
*** Output of to_html ***
|
23
|
+
<div class='warning'>
|
24
|
+
<p>this is the last warning!</p>
|
25
|
+
|
26
|
+
<p>please, go away!</p>
|
27
|
+
|
28
|
+
<div class='menace'>
|
29
|
+
<p>or else terrible things will happen</p>
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
*** Output of to_latex ***
|
33
|
+
|
34
|
+
*** Output of to_md ***
|
35
|
+
this is the last warning!
|
36
|
+
|
37
|
+
please, go away!
|
38
|
+
|
39
|
+
or else terrible things will happen
|
40
|
+
*** Output of to_s ***
|
41
|
+
this is the last warning!please, go away!or else terrible things will happen
|
42
|
+
*** EOF ***
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
OK!
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
*** Output of Markdown.pl ***
|
51
|
+
<p>+-----------------------------------{.warning}------
|
52
|
+
| this is the last warning!
|
53
|
+
|
|
54
|
+
| please, go away!
|
55
|
+
|
|
56
|
+
| +------------------------------------- {.menace} --
|
57
|
+
| | or else terrible things will happen
|
58
|
+
| +--------------------------------------------------
|
59
|
+
+---------------------------------------------------</p>
|
60
|
+
|
61
|
+
*** Output of Markdown.pl (parsed) ***
|
62
|
+
Error: #<NoMethodError: private method `write_children' called for <div> ... </>:REXML::Element>
|
data/tests/unittest/email.md
CHANGED
@@ -27,7 +27,7 @@ This is an email address:
|
|
27
27
|
|
28
28
|
|
29
29
|
*** Output of Markdown.pl ***
|
30
|
-
<p>This is an email address: <a href="&#
|
30
|
+
<p>This is an email address: <a href="mailto:andrea@invalid.it">andrea@invalid.it</a></p>
|
31
31
|
|
32
32
|
*** Output of Markdown.pl (parsed) ***
|
33
33
|
Error: #<NoMethodError: private method `write_children' called for <div> ... </>:REXML::Element>
|
data/tests/unittest/links.md
CHANGED
@@ -162,7 +162,7 @@ Search on GoogleSearch on GoogleSearch on GoogleSearch on GoogleSearch on Google
|
|
162
162
|
|
163
163
|
<p>Inline with title: <a href="http://google.com "Title"">Google images</a></p>
|
164
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="&#
|
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
166
|
or you might ask bill@google.com.</p>
|
167
167
|
|
168
168
|
<p>If all else fails, ask <a href="http://www.google.com">Google</a></p>
|
@@ -90,11 +90,11 @@ md_el(:document,[
|
|
90
90
|
<pre><code><http://www.dd.com>
|
91
91
|
</code></pre>
|
92
92
|
|
93
|
-
<p><a href="m&#
|
93
|
+
<p><a href="mailto:a@invalid.it">a@invalid.it</a></p>
|
94
94
|
|
95
|
-
<p><a href="
|
95
|
+
<p><a href="mailto:a@invalid.it">a@invalid.it</a></p>
|
96
96
|
|
97
|
-
<p><a href="ma&#
|
97
|
+
<p><a href="mailto:a@invalid.it">a@invalid.it</a></p>
|
98
98
|
|
99
99
|
<pre><code><a@invalid.it>
|
100
100
|
</code></pre>
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.10
|
|
3
3
|
specification_version: 1
|
4
4
|
name: maruku
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.5.
|
7
|
-
date: 2008-
|
6
|
+
version: 0.5.9
|
7
|
+
date: 2008-06-08
|
8
8
|
summary: Maruku is a Markdown-superset interpreter written in Ruby.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -41,6 +41,7 @@ files:
|
|
41
41
|
- lib/maruku/textile2.rb
|
42
42
|
- lib/maruku/toc.rb
|
43
43
|
- lib/maruku/version.rb
|
44
|
+
- lib/maruku/ext/div.rb
|
44
45
|
- lib/maruku/ext/math.rb
|
45
46
|
- lib/maruku/ext/math/elements.rb
|
46
47
|
- lib/maruku/ext/math/latex_fix.rb
|
@@ -89,8 +90,11 @@ files:
|
|
89
90
|
- docs/markdown_syntax.html
|
90
91
|
- docs/maruku.html
|
91
92
|
- docs/proposal.html
|
93
|
+
- tests/bugs/abbrev.md
|
92
94
|
- tests/bugs/code_in_links.md
|
93
95
|
- tests/bugs/complex_escaping.md
|
96
|
+
- tests/bugs/html.md
|
97
|
+
- tests/bugs/links.md
|
94
98
|
- tests/diagrams/diagrams.md
|
95
99
|
- tests/math/syntax.md
|
96
100
|
- tests/math_usage/document.md
|
@@ -192,6 +196,9 @@ files:
|
|
192
196
|
- tests/unittest/attributes/attributes.md
|
193
197
|
- tests/unittest/attributes/circular.md
|
194
198
|
- tests/unittest/attributes/default.md
|
199
|
+
- tests/unittest/divs/div1.md
|
200
|
+
- tests/unittest/divs/div2.md
|
201
|
+
- tests/unittest/divs/div3_nest.md
|
195
202
|
- tests/unittest/encoding/iso-8859-1.md
|
196
203
|
- tests/unittest/encoding/utf-8.md
|
197
204
|
- tests/unittest/math/equations.md
|