maruku 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/{maruku0.3 → marudown} +6 -14
- data/bin/maruku +1 -1
- data/bin/marutest +37 -9
- data/docs/TOFIX.html +22 -0
- data/docs/TOFIX.md +3 -0
- data/docs/changelog-0.2.13.html +30 -0
- data/docs/changelog-0.2.13.md +6 -0
- data/docs/changelog-0.3.html +19 -5
- data/docs/faq.html +51 -40
- data/docs/faq.md +3 -3
- data/docs/hidden_o_n_squared.md +10 -0
- data/docs/index.html +84 -396
- data/docs/markdown_syntax.html +139 -330
- data/docs/markdown_syntax.md +80 -93
- data/docs/maruku.html +84 -396
- data/docs/maruku.md +88 -158
- data/docs/proposal.html +13 -106
- data/docs/proposal.md +3 -3
- data/docs/todo.html +38 -28
- data/lib/maruku.rb +77 -11
- data/lib/maruku/attributes.rb +186 -0
- data/lib/maruku/defaults.rb +40 -0
- data/lib/maruku/errors_management.rb +55 -39
- data/lib/maruku/helpers.rb +156 -72
- data/lib/maruku/input/charsource.rb +319 -0
- data/lib/maruku/{html_helper.rb → input/html_helper.rb} +30 -9
- data/lib/maruku/input/linesource.rb +111 -0
- data/lib/maruku/input/parse_block.rb +562 -0
- data/lib/maruku/{parse_doc.rb → input/parse_doc.rb} +60 -28
- data/lib/maruku/{parse_span_better.rb → input/parse_span_better.rb} +226 -256
- data/lib/maruku/input/type_detection.rb +137 -0
- data/lib/maruku/maruku.rb +33 -0
- data/lib/maruku/{to_html.rb → output/to_html.rb} +151 -132
- data/lib/maruku/{to_latex.rb → output/to_latex.rb} +31 -35
- data/lib/maruku/{to_latex_entities.rb → output/to_latex_entities.rb} +25 -3
- data/lib/maruku/output/to_latex_strings.rb +64 -0
- data/lib/maruku/output/to_markdown.rb +164 -0
- data/lib/maruku/{to_s.rb → output/to_s.rb} +6 -0
- data/lib/maruku/string_utils.rb +12 -181
- data/lib/maruku/structures.rb +91 -67
- data/lib/maruku/structures_inspect.rb +78 -0
- data/lib/maruku/structures_iterators.rb +24 -2
- data/lib/maruku/tests/benchmark.rb +41 -9
- data/lib/maruku/tests/new_parser.rb +317 -286
- data/lib/maruku/tests/tests.rb +20 -0
- data/lib/maruku/toc.rb +64 -64
- data/lib/maruku/usage/example1.rb +33 -0
- data/lib/maruku/version.rb +8 -2
- data/tests/unittest/abbreviations.md +27 -16
- data/tests/unittest/attributes/attributes.md +89 -0
- data/tests/unittest/attributes/circular.md +51 -0
- data/tests/unittest/attributes/default.md +47 -0
- data/tests/unittest/blank.md +10 -6
- data/tests/unittest/blanks_in_code.md +26 -26
- data/tests/unittest/code.md +9 -9
- data/tests/unittest/code2.md +12 -13
- data/tests/unittest/code3.md +34 -34
- data/tests/unittest/easy.md +9 -7
- data/tests/unittest/email.md +9 -7
- data/tests/unittest/encoding/iso-8859-1.md +41 -4
- data/tests/unittest/encoding/utf-8.md +6 -5
- data/tests/unittest/entities.md +52 -80
- data/tests/unittest/escaping.md +47 -35
- data/tests/unittest/extra_dl.md +19 -29
- data/tests/unittest/extra_header_id.md +31 -24
- data/tests/unittest/extra_table1.md +14 -32
- data/tests/unittest/footnotes.md +58 -42
- data/tests/unittest/headers.md +11 -11
- data/tests/unittest/hrule.md +14 -24
- data/tests/unittest/images.md +41 -26
- data/tests/unittest/inline_html.md +104 -56
- data/tests/unittest/inline_html2.md +38 -0
- data/tests/unittest/links.md +74 -33
- data/tests/unittest/list1.md +18 -15
- data/tests/unittest/list2.md +31 -13
- data/tests/unittest/list3.md +29 -28
- data/tests/unittest/list4.md +103 -12
- data/tests/unittest/lists.md +86 -53
- data/tests/unittest/lists6.md +53 -0
- data/tests/unittest/lists7.md +31 -0
- data/tests/unittest/lists_after_paragraph.md +105 -71
- data/tests/unittest/lists_ol.md +149 -73
- data/tests/unittest/misc_sw.md +366 -326
- data/tests/unittest/notyet/escape.md +10 -10
- data/tests/unittest/notyet/header_after_par.md +20 -14
- data/tests/unittest/notyet/ticks.md +8 -35
- data/tests/unittest/notyet/triggering.md +72 -45
- data/tests/unittest/olist.md +78 -0
- data/tests/unittest/one.md +5 -3
- data/tests/unittest/paragraph.md +5 -3
- data/tests/unittest/paragraph_rules/dont_merge_ref.md +15 -9
- data/tests/unittest/paragraph_rules/tab_is_blank.md +9 -5
- data/tests/unittest/paragraphs.md +21 -26
- data/tests/unittest/recover/recover_links.md +6 -5
- data/tests/unittest/references/long_example.md +39 -30
- data/tests/unittest/references/spaces_and_numbers.md +2 -2
- data/tests/unittest/syntax_hl.md +33 -31
- data/tests/unittest/test.md +4 -6
- data/tests/unittest/wrapping.md +43 -26
- metadata +160 -139
- data/docs/markdown_extra2.html +0 -87
- data/docs/markdown_extra2.md +0 -83
- data/docs/markdown_syntax_2.html +0 -152
- data/lib/maruku/parse_block.rb +0 -564
- data/lib/maruku/parse_span.rb +0 -451
- data/lib/maruku/to_latex_strings.rb +0 -59
- data/lib/maruku/to_markdown.rb +0 -110
- data/lib/test.rb +0 -29
@@ -12,34 +12,16 @@ Content Cell | Content Cell
|
|
12
12
|
*** Output of inspect ***
|
13
13
|
md_el(:document,[
|
14
14
|
md_el(:table,[
|
15
|
-
md_el(:head_cell,["First Header"]
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
]
|
22
|
-
]
|
15
|
+
md_el(:head_cell,["First Header"],{},[]),
|
16
|
+
md_el(:head_cell,["Second Header"],{},[]),
|
17
|
+
md_el(:cell,["Content Cell"],{},[]),
|
18
|
+
md_el(:cell,["Content Cell"],{},[]),
|
19
|
+
md_el(:cell,["Content Cell"],{},[]),
|
20
|
+
md_el(:cell,["Content Cell"],{},[])
|
21
|
+
],{:align=>[:left, :left]},[])
|
22
|
+
],{},[])
|
23
23
|
*** Output of to_html ***
|
24
|
-
|
25
|
-
<table>
|
26
|
-
<thead>
|
27
|
-
<tr><th>First Header</th><th>Second Header</th></tr>
|
28
|
-
</thead>
|
29
|
-
<tbody>
|
30
|
-
<tr>
|
31
|
-
<td style='text-align: left;'>Content Cell</td>
|
32
|
-
|
33
|
-
<td style='text-align: left;'>Content Cell</td>
|
34
|
-
</tr>
|
35
|
-
|
36
|
-
<tr>
|
37
|
-
<td style='text-align: left;'>Content Cell</td>
|
38
|
-
|
39
|
-
<td style='text-align: left;'>Content Cell</td>
|
40
|
-
</tr>
|
41
|
-
</tbody></table>
|
42
|
-
|
24
|
+
<table><thead><tr><th>First Header</th><th>Second Header</th></tr></thead><tbody><tr><td style='text-align: left;'>Content Cell</td><td style='text-align: left;'>Content Cell</td></tr><tr><td style='text-align: left;'>Content Cell</td><td style='text-align: left;'>Content Cell</td></tr></tbody></table>
|
43
25
|
*** Output of to_latex ***
|
44
26
|
\begin{tabular}{l|l}
|
45
27
|
First Header&Second Header\\
|
@@ -49,7 +31,7 @@ Content Cell&Content Cell\\
|
|
49
31
|
\end{tabular}
|
50
32
|
|
51
33
|
|
52
|
-
*** Output of
|
34
|
+
*** Output of to_md ***
|
53
35
|
First HeaderSecond HeaderContent CellContent CellContent CellContent Cell
|
54
36
|
*** Output of to_s ***
|
55
37
|
First HeaderSecond HeaderContent CellContent CellContent CellContent Cell
|
@@ -71,8 +53,8 @@ Content Cell | Content Cell</p>
|
|
71
53
|
|
72
54
|
*** Output of Markdown.pl (parsed) ***
|
73
55
|
<p>CSS: style.css</p
|
74
|
-
|
56
|
+
><p>First Header | Second Header
|
75
57
|
------------- | -------------
|
76
|
-
Content Cell
|
77
|
-
Content Cell
|
78
|
-
|
58
|
+
Content Cell | Content Cell
|
59
|
+
Content Cell | Content Cell</p
|
60
|
+
>
|
data/tests/unittest/footnotes.md
CHANGED
@@ -23,43 +23,42 @@ This is not a footnote.
|
|
23
23
|
md_el(:document,[
|
24
24
|
md_par([
|
25
25
|
"That's some text with a footnote ",
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
26
|
+
md_foot_ref("^b"),
|
27
|
+
" and another ",
|
28
|
+
md_foot_ref("^c"),
|
29
|
+
" and another ",
|
30
|
+
md_foot_ref("^a"),
|
31
|
+
"."
|
32
32
|
]),
|
33
|
-
|
34
|
-
]
|
33
|
+
md_el(:footnote,[
|
34
|
+
md_par(["And that's the footnote."]),
|
35
|
+
md_par(["That's the second paragraph of the footnote."])
|
36
|
+
],{:footnote_id=>"^a"},[]),
|
37
|
+
md_el(:footnote,[
|
38
|
+
md_par(["And that's the footnote. This is second sentence (same paragraph)"])
|
39
|
+
],{:footnote_id=>"^b"},[]),
|
40
|
+
md_el(:footnote,[
|
41
|
+
md_par(["This is the very long one."]),
|
42
|
+
md_par(["That's the second paragraph."])
|
43
|
+
],{:footnote_id=>"^c"},[]),
|
44
|
+
md_par(["This is not a footnote."])
|
45
|
+
],{},[])
|
35
46
|
*** Output of to_html ***
|
36
47
|
|
37
48
|
<p>That's some text with a footnote <sup id='fnref:1'><a href='#fn:1' rel='footnote'>1</a></sup> and another <sup id='fnref:2'><a href='#fn:2' rel='footnote'>2</a></sup> and another <sup id='fnref:3'><a href='#fn:3' rel='footnote'>3</a></sup>.</p>
|
38
49
|
|
39
50
|
<p>This is not a footnote.</p>
|
40
|
-
|
41
|
-
<
|
42
|
-
<
|
43
|
-
|
44
|
-
<ol>
|
45
|
-
<li id='fn:1'>
|
46
|
-
<p>And that's the footnote. This is second sentence (same paragraph)<a href='#fnref:1' rev='footnote'>↩</a></p>
|
47
|
-
</li>
|
48
|
-
|
49
|
-
<li id='fn:2'>
|
51
|
+
<div class='footnotes'><hr /><ol><li id='fn:1'>
|
52
|
+
<p>And that's the footnote. This is second sentence (same paragraph)</p>
|
53
|
+
<a href='#fnref:1' rev='footnote'>↩</a></li><li id='fn:2'>
|
50
54
|
<p>This is the very long one.</p>
|
51
55
|
|
52
|
-
<p>That's the second paragraph
|
53
|
-
|
54
|
-
|
55
|
-
<li id='fn:3'>
|
56
|
+
<p>That's the second paragraph.</p>
|
57
|
+
<a href='#fnref:2' rev='footnote'>↩</a></li><li id='fn:3'>
|
56
58
|
<p>And that's the footnote.</p>
|
57
59
|
|
58
|
-
<p>That's the second paragraph of the footnote
|
59
|
-
|
60
|
-
</ol>
|
61
|
-
</div>
|
62
|
-
|
60
|
+
<p>That's the second paragraph of the footnote.</p>
|
61
|
+
<a href='#fnref:3' rev='footnote'>↩</a></li></ol></div>
|
63
62
|
*** Output of to_latex ***
|
64
63
|
That's some text with a footnote \footnote{And that's the footnote. This is second sentence (same paragraph)} and another \footnote{This is the very long one.
|
65
64
|
|
@@ -70,10 +69,27 @@ That's the second paragraph of the footnote.} .
|
|
70
69
|
This is not a footnote.
|
71
70
|
|
72
71
|
|
72
|
+
*** Output of to_md ***
|
73
|
+
That's some text with a footnote and
|
74
|
+
another and another .
|
75
|
+
|
76
|
+
And that's the footnote.
|
77
|
+
|
78
|
+
That's the second paragraph of the
|
79
|
+
footnote.
|
80
|
+
|
81
|
+
And that's the footnote. This is second
|
82
|
+
sentence (same paragraph)
|
83
|
+
|
84
|
+
This is the very long one.
|
85
|
+
|
86
|
+
That's the second paragraph.
|
87
|
+
|
88
|
+
This is not a footnote.
|
89
|
+
|
90
|
+
|
73
91
|
*** Output of to_s ***
|
74
|
-
That's some text with a footnote and another and another .This is not a footnote.
|
75
|
-
*** Output of to_s ***
|
76
|
-
That's some text with a footnote and another and another .This is not a footnote.
|
92
|
+
That's some text with a footnote and another and another .And that's the footnote.That's the second paragraph of the footnote.And that's the footnote. This is second sentence (same paragraph)This is the very long one.That's the second paragraph.This is not a footnote.
|
77
93
|
*** EOF ***
|
78
94
|
|
79
95
|
|
@@ -103,18 +119,18 @@ This is second sentence (same paragraph).</p>
|
|
103
119
|
|
104
120
|
*** Output of Markdown.pl (parsed) ***
|
105
121
|
<p>That's some text with a footnote [^b] and another [^c] and another [^a].</p
|
106
|
-
|
107
|
-
|
108
|
-
|
122
|
+
><p>[^a]: And that's the footnote.</p
|
123
|
+
><pre
|
124
|
+
><code>That's the second paragraph of the footnote.
|
109
125
|
</code
|
110
|
-
|
111
|
-
|
126
|
+
></pre
|
127
|
+
><p>[^b]: And that's the footnote.
|
112
128
|
This is second sentence (same paragraph).</p
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
129
|
+
><p>[^c]:
|
130
|
+
This is the very long one.</p
|
131
|
+
><pre
|
132
|
+
><code>That's the second paragraph.
|
117
133
|
</code
|
118
|
-
|
119
|
-
|
120
|
-
|
134
|
+
></pre
|
135
|
+
><p>This is not a footnote.</p
|
136
|
+
>
|
data/tests/unittest/headers.md
CHANGED
@@ -15,10 +15,10 @@ A title with *emphasis*
|
|
15
15
|
|
16
16
|
*** Output of inspect ***
|
17
17
|
md_el(:document,[
|
18
|
-
md_el(:header,["A title with ", md_em(["emphasis"])]
|
19
|
-
|
20
|
-
|
21
|
-
]
|
18
|
+
md_el(:header,["A title with ", md_em(["emphasis"])],{:level=>1},[]),
|
19
|
+
md_el(:header,["A title with ", md_em(["emphasis"])],{:level=>2},[]),
|
20
|
+
md_el(:header,["A title with ", md_em(["emphasis"])],{:level=>4},[])
|
21
|
+
],{},[])
|
22
22
|
*** Output of to_html ***
|
23
23
|
|
24
24
|
<h1 id='a_title_with_emphasis'>A title with <em>emphasis</em></h1>
|
@@ -35,7 +35,7 @@ md_el(:document,[
|
|
35
35
|
\hypertarget{a_title_with_emphasis}{}\paragraph*{{A title with {\em emphasis}}}\label{a_title_with_emphasis}
|
36
36
|
|
37
37
|
|
38
|
-
*** Output of
|
38
|
+
*** Output of to_md ***
|
39
39
|
A title with emphasisA title with emphasisA title with emphasis
|
40
40
|
*** Output of to_s ***
|
41
41
|
A title with emphasisA title with emphasisA title with emphasis
|
@@ -56,9 +56,9 @@ A title with emphasisA title with emphasisA title with emphasis
|
|
56
56
|
|
57
57
|
*** Output of Markdown.pl (parsed) ***
|
58
58
|
<h1>A title with <em>emphasis</em
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
59
|
+
></h1
|
60
|
+
><h2>A title with <em>emphasis</em
|
61
|
+
></h2
|
62
|
+
><h4>A title with <em>emphasis</em
|
63
|
+
></h4
|
64
|
+
>
|
data/tests/unittest/hrule.md
CHANGED
@@ -15,24 +15,14 @@ Write a comment abouth the test here.
|
|
15
15
|
|
16
16
|
*** Output of inspect ***
|
17
17
|
md_el(:document,[
|
18
|
-
md_el(:hrule,[]
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
]
|
18
|
+
md_el(:hrule,[],{},[]),
|
19
|
+
md_el(:hrule,[],{},[]),
|
20
|
+
md_el(:hrule,[],{},[]),
|
21
|
+
md_el(:hrule,[],{},[]),
|
22
|
+
md_el(:hrule,[],{},[])
|
23
|
+
],{},[])
|
24
24
|
*** Output of to_html ***
|
25
|
-
|
26
|
-
<hr />
|
27
|
-
|
28
|
-
<hr />
|
29
|
-
|
30
|
-
<hr />
|
31
|
-
|
32
|
-
<hr />
|
33
|
-
|
34
|
-
<hr />
|
35
|
-
|
25
|
+
<hr /><hr /><hr /><hr /><hr />
|
36
26
|
*** Output of to_latex ***
|
37
27
|
|
38
28
|
\vspace{.5em} \hrule \vspace{.5em}
|
@@ -45,7 +35,7 @@ md_el(:document,[
|
|
45
35
|
|
46
36
|
\vspace{.5em} \hrule \vspace{.5em}
|
47
37
|
|
48
|
-
*** Output of
|
38
|
+
*** Output of to_md ***
|
49
39
|
|
50
40
|
*** Output of to_s ***
|
51
41
|
|
@@ -69,9 +59,9 @@ md_el(:document,[
|
|
69
59
|
<hr />
|
70
60
|
|
71
61
|
*** Output of Markdown.pl (parsed) ***
|
72
|
-
<hr
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
62
|
+
<hr
|
63
|
+
/><hr
|
64
|
+
/><hr
|
65
|
+
/><hr
|
66
|
+
/><hr
|
67
|
+
/>
|
data/tests/unittest/images.md
CHANGED
@@ -28,27 +28,27 @@ This is double size: ![Cascading Style Sheets] [css2]
|
|
28
28
|
md_el(:document,[
|
29
29
|
md_par([
|
30
30
|
"This page does not uilizes ",
|
31
|
-
|
31
|
+
md_im_image(["Cascading Style Sheets"], "http://jigsaw.w3.org/css-validator/images/vcss", nil)
|
32
32
|
]),
|
33
|
-
|
33
|
+
md_par([
|
34
34
|
"Please mouseover to see the title: ",
|
35
|
-
|
35
|
+
md_im_image(["Cascading Style Sheets"], "http://jigsaw.w3.org/css-validator/images/vcss", "Title ok!")
|
36
36
|
]),
|
37
|
-
|
37
|
+
md_par([
|
38
38
|
"Please mouseover to see the title: ",
|
39
|
-
|
39
|
+
md_im_image(["Cascading Style Sheets"], "http://jigsaw.w3.org/css-validator/images/vcss", "Title ok!")
|
40
40
|
]),
|
41
|
-
|
41
|
+
md_par([
|
42
42
|
"I'll say it one more time: this page does not use ",
|
43
|
-
|
43
|
+
md_image(["Cascading Style Sheets"], "css")
|
44
44
|
]),
|
45
|
-
|
45
|
+
md_par([
|
46
46
|
"This is double size: ",
|
47
|
-
|
47
|
+
md_image(["Cascading Style Sheets"], "css2")
|
48
48
|
]),
|
49
|
-
|
50
|
-
|
51
|
-
]
|
49
|
+
md_ref_def("css", "http://jigsaw.w3.org/css-validator/images/vcss", {:title=>"Optional title attribute"}),
|
50
|
+
md_ref_def("css2", "http://jigsaw.w3.org/css-validator/images/vcss", {:title=>"Optional title attribute"})
|
51
|
+
],{},[])
|
52
52
|
*** Output of to_html ***
|
53
53
|
|
54
54
|
<p>This page does not uilizes <img src='http://jigsaw.w3.org/css-validator/images/vcss' /></p>
|
@@ -73,8 +73,23 @@ I'll say it one more time: this page does not use {\bf Images not supported yet
|
|
73
73
|
This is double size: {\bf Images not supported yet (\char104\char116\char116\char112\char58\char47\char47\char106\char105\char103\char115\char97\char119\char46\char119\char51\char46\char111\char114\char103\char47\char99\char115\char115\char45\char118\char97\char108\char105\char100\char97\char116\char111\char114\char47\char105\char109\char97\char103\char101\char115\char47\char118\char99\char115\char115)}
|
74
74
|
|
75
75
|
|
76
|
-
*** Output of
|
77
|
-
This page does not uilizes
|
76
|
+
*** Output of to_md ***
|
77
|
+
This page does not uilizes
|
78
|
+
Cascading Style Sheets
|
79
|
+
|
80
|
+
Please mouseover to see the title:
|
81
|
+
Cascading Style Sheets
|
82
|
+
|
83
|
+
Please mouseover to see the title:
|
84
|
+
Cascading Style Sheets
|
85
|
+
|
86
|
+
I'll say it one more time: this page
|
87
|
+
does not use Cascading Style Sheets
|
88
|
+
|
89
|
+
This is double size:
|
90
|
+
Cascading Style Sheets
|
91
|
+
|
92
|
+
|
78
93
|
*** Output of to_s ***
|
79
94
|
This page does not uilizes Cascading Style SheetsPlease mouseover to see the title: Cascading Style SheetsPlease mouseover to see the title: Cascading Style SheetsI'll say it one more time: this page does not use Cascading Style SheetsThis is double size: Cascading Style Sheets
|
80
95
|
*** EOF ***
|
@@ -100,15 +115,15 @@ This page does not uilizes Cascading Style SheetsPlease mouseover to see the tit
|
|
100
115
|
style="border:0;width:188px;height:131px"</p>
|
101
116
|
|
102
117
|
*** Output of Markdown.pl (parsed) ***
|
103
|
-
<p>This page does not uilizes <img title='' src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Cascading Style Sheets'
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
118
|
+
<p>This page does not uilizes <img title='' src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Cascading Style Sheets'
|
119
|
+
/></p
|
120
|
+
><p>Please mouseover to see the title: <img title='Title ok!' src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Cascading Style Sheets'
|
121
|
+
/></p
|
122
|
+
><p>Please mouseover to see the title: <img title='Title ok!' src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Cascading Style Sheets'
|
123
|
+
/></p
|
124
|
+
><p>I'll say it one more time: this page does not use <img title='Optional title attribute' src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Cascading Style Sheets'
|
125
|
+
/></p
|
126
|
+
><p>This is double size: ![Cascading Style Sheets] [css2]</p
|
127
|
+
><p>[css2]: http://jigsaw.w3.org/css-validator/images/vcss "Optional title attribute" class=external
|
128
|
+
style="border:0;width:188px;height:131px"</p
|
129
|
+
>
|
@@ -5,11 +5,15 @@ Write a comment abouth the test here.
|
|
5
5
|
CSS: style.css
|
6
6
|
|
7
7
|
Input:
|
8
|
-
|
8
|
+
|
9
|
+
<em>Emphasis</em>
|
10
|
+
|
9
11
|
Result: <em>Emphasis</em>
|
10
12
|
|
11
13
|
Input:
|
14
|
+
|
12
15
|
<img src="http://jigsaw.w3.org/css-validator/images/vcss"/>
|
16
|
+
|
13
17
|
Result on span: <img src="http://jigsaw.w3.org/css-validator/images/vcss"/>
|
14
18
|
|
15
19
|
Result alone:
|
@@ -26,6 +30,9 @@ Without closing:
|
|
26
30
|
<p markdown="1">
|
27
31
|
This is *true* markdown text (no paragraph)
|
28
32
|
</p>
|
33
|
+
<p markdown="block">
|
34
|
+
This is *true* markdown text (block paragraph)
|
35
|
+
</p>
|
29
36
|
</div>
|
30
37
|
|
31
38
|
<table>
|
@@ -47,86 +54,98 @@ The following is invalid HTML, and will generate an error:
|
|
47
54
|
|
48
55
|
*** Output of inspect ***
|
49
56
|
md_el(:document,[
|
57
|
+
md_par(["Input:"]),
|
58
|
+
md_el(:code,[],{:raw_code=>"<em>Emphasis</em>\n"},[]),
|
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\"/>\n"},[]),
|
50
62
|
md_par([
|
51
|
-
"
|
52
|
-
|
53
|
-
" Result: ",
|
54
|
-
md_html("<em>Emphasis</em>")
|
55
|
-
]),
|
56
|
-
md_par([
|
57
|
-
"Input: ",
|
58
|
-
md_html("<img src=\"http://jigsaw.w3.org/css-validator/images/vcss\" />"),
|
59
|
-
" Result on span: ",
|
60
|
-
md_html("<img src=\"http://jigsaw.w3.org/css-validator/images/vcss\" />")
|
63
|
+
"Result on span: ",
|
64
|
+
md_html("<img src=\"http://jigsaw.w3.org/css-validator/images/vcss\" />")
|
61
65
|
]),
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
]
|
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
|
+
],{},[])
|
72
76
|
*** Output of to_html ***
|
73
77
|
|
74
|
-
<p>Input
|
78
|
+
<p>Input:</p>
|
79
|
+
<pre><code><em>Emphasis</em>
|
80
|
+
</code></pre>
|
81
|
+
<p>Result: <em>Emphasis</em></p>
|
75
82
|
|
76
|
-
<p>Input
|
83
|
+
<p>Input:</p>
|
84
|
+
<pre><code><img src="http://jigsaw.w3.org/css-validator/images/vcss"/>
|
85
|
+
</code></pre>
|
86
|
+
<p>Result on span: <img src='http://jigsaw.w3.org/css-validator/images/vcss' /></p>
|
77
87
|
|
78
|
-
<p>Result alone
|
88
|
+
<p>Result alone:</p>
|
79
89
|
<img src='http://jigsaw.w3.org/css-validator/images/vcss' />
|
80
90
|
<p>Without closing:</p>
|
81
|
-
<img src='http://jigsaw.w3.org/css-validator/images/vcss'
|
82
|
-
<div>
|
91
|
+
<img src='http://jigsaw.w3.org/css-validator/images/vcss' /><div>
|
83
92
|
<p>This is <em>true</em> markdown text (paragraph)</p>
|
84
|
-
|
85
|
-
<p>This is <em>true</em> markdown text (
|
86
|
-
</div>
|
87
|
-
|
88
|
-
<table>
|
89
|
-
|
93
|
+
<p>This is <em>true</em> markdown text (no paragraph)</p><p>
|
94
|
+
<p>This is <em>true</em> markdown text (block paragraph)</p>
|
95
|
+
</p></div><table>
|
90
96
|
<tr>
|
91
|
-
|
92
97
|
<td>This is <em>true</em> markdown text. (no par)</td>
|
93
|
-
|
94
|
-
|
95
98
|
<td>
|
96
99
|
<p>This is <em>true</em> markdown text. (par)</p>
|
97
100
|
</td>
|
98
|
-
|
99
101
|
</tr>
|
100
|
-
|
101
102
|
</table>
|
102
|
-
|
103
103
|
<p>The following is invalid HTML, and will generate an error:</p>
|
104
|
-
|
105
104
|
<pre class='markdown-html-error' style='border: solid 3px red; background-color: pink'>HTML parse error:
|
106
105
|
<table>
|
107
106
|
<td markdown="1">This is *true* markdown text. (no par)</td>
|
108
107
|
<td markdown="block">This is *true* markdown text. (par)</td>
|
109
|
-
</tr></pre>
|
110
|
-
|
111
|
-
<pre class='markdown-html-error' style='border: solid 3px red; background-color: pink'>HTML parse error:
|
108
|
+
</tr></pre><pre class='markdown-html-error' style='border: solid 3px red; background-color: pink'>HTML parse error:
|
112
109
|
</table></pre>
|
113
|
-
|
114
110
|
*** Output of to_latex ***
|
115
|
-
Input:
|
111
|
+
Input:
|
116
112
|
|
117
|
-
|
113
|
+
\begin{verbatim}<em>Emphasis</em>
|
114
|
+
\end{verbatim}
|
115
|
+
Result: {\bf Raw HTML removed in latex version }
|
118
116
|
|
119
|
-
|
117
|
+
Input:
|
118
|
+
|
119
|
+
\begin{verbatim}<img src="http://jigsaw.w3.org/css-validator/images/vcss"/>
|
120
|
+
\end{verbatim}
|
121
|
+
Result on span: {\bf Raw HTML removed in latex version }
|
122
|
+
|
123
|
+
Result alone:
|
120
124
|
|
121
125
|
{\bf Raw HTML removed in latex version }Without closing:
|
122
126
|
|
123
127
|
{\bf Raw HTML removed in latex version }{\bf Raw HTML removed in latex version }{\bf Raw HTML removed in latex version }The following is invalid HTML, and will generate an error:
|
124
128
|
|
125
129
|
{\bf Raw HTML removed in latex version }{\bf Raw HTML removed in latex version }
|
130
|
+
*** Output of to_md ***
|
131
|
+
Input:
|
132
|
+
|
133
|
+
Result:
|
134
|
+
|
135
|
+
Input:
|
136
|
+
|
137
|
+
Result on span:
|
138
|
+
|
139
|
+
Result alone:
|
140
|
+
|
141
|
+
Without closing:
|
142
|
+
|
143
|
+
The following is invalid HTML, and will
|
144
|
+
generate an error:
|
145
|
+
|
146
|
+
|
126
147
|
*** Output of to_s ***
|
127
|
-
Input:
|
128
|
-
*** Output of to_s ***
|
129
|
-
Input: Result: Input: Result on span: Result alone: Without closing:The following is invalid HTML, and will generate an error:
|
148
|
+
Input:Result: Input:Result on span: Result alone:Without closing:The following is invalid HTML, and will generate an error:
|
130
149
|
*** EOF ***
|
131
150
|
|
132
151
|
|
@@ -138,13 +157,19 @@ Input: Result: Input: Result on span: Result alone: Without closing:The follow
|
|
138
157
|
*** Output of Markdown.pl ***
|
139
158
|
<p>CSS: style.css</p>
|
140
159
|
|
141
|
-
<p>Input
|
142
|
-
|
143
|
-
|
160
|
+
<p>Input:</p>
|
161
|
+
|
162
|
+
<pre><code><em>Emphasis</em>
|
163
|
+
</code></pre>
|
164
|
+
|
165
|
+
<p>Result: <em>Emphasis</em></p>
|
166
|
+
|
167
|
+
<p>Input:</p>
|
144
168
|
|
145
|
-
<
|
146
|
-
|
147
|
-
|
169
|
+
<pre><code><img src="http://jigsaw.w3.org/css-validator/images/vcss"/>
|
170
|
+
</code></pre>
|
171
|
+
|
172
|
+
<p>Result on span: <img src="http://jigsaw.w3.org/css-validator/images/vcss"/></p>
|
148
173
|
|
149
174
|
<p>Result alone: </p>
|
150
175
|
|
@@ -160,6 +185,9 @@ Result on span: <img src="http://jigsaw.w3.org/css-validator/images/vcss"/></p>
|
|
160
185
|
<p markdown="1">
|
161
186
|
This is *true* markdown text (no paragraph)
|
162
187
|
</p>
|
188
|
+
<p markdown="block">
|
189
|
+
This is *true* markdown text (block paragraph)
|
190
|
+
</p>
|
163
191
|
</div>
|
164
192
|
|
165
193
|
<table>
|
@@ -178,7 +206,27 @@ Result on span: <img src="http://jigsaw.w3.org/css-validator/images/vcss"/></p>
|
|
178
206
|
</table>
|
179
207
|
|
180
208
|
*** Output of Markdown.pl (parsed) ***
|
181
|
-
Error: #<REXML::ParseException: Missing end tag for 'img' (got "p")
|
209
|
+
Error: #<REXML::ParseException: #<REXML::ParseException: Missing end tag for 'img' (got "p")
|
210
|
+
Line:
|
211
|
+
Position:
|
212
|
+
Last 80 unconsumed characters:
|
213
|
+
<div markdown="1"> This is *true* markdown text (paragraph) <p markdow>
|
214
|
+
/Volumes/Alter/Ruby/local/lib/ruby/1.8/rexml/parsers/baseparser.rb:315:in `pull'
|
215
|
+
/Volumes/Alter/Ruby/local/lib/ruby/1.8/rexml/parsers/treeparser.rb:21:in `parse'
|
216
|
+
/Volumes/Alter/Ruby/local/lib/ruby/1.8/rexml/document.rb:190:in `build'
|
217
|
+
/Volumes/Alter/Ruby/local/lib/ruby/1.8/rexml/document.rb:45:in `initialize'
|
218
|
+
bin/marutest:171:in `new'
|
219
|
+
bin/marutest:171:in `run_test'
|
220
|
+
bin/marutest:235:in `marutest'
|
221
|
+
bin/marutest:233:in `each'
|
222
|
+
bin/marutest:233:in `marutest'
|
223
|
+
bin/marutest:303
|
224
|
+
...
|
225
|
+
Missing end tag for 'img' (got "p")
|
226
|
+
Line:
|
227
|
+
Position:
|
228
|
+
Last 80 unconsumed characters:
|
229
|
+
<div markdown="1"> This is *true* markdown text (paragraph) <p markdow
|
182
230
|
Line:
|
183
231
|
Position:
|
184
232
|
Last 80 unconsumed characters:
|