maruku 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. data/bin/{maruku0.3 → marudown} +6 -14
  2. data/bin/maruku +1 -1
  3. data/bin/marutest +37 -9
  4. data/docs/TOFIX.html +22 -0
  5. data/docs/TOFIX.md +3 -0
  6. data/docs/changelog-0.2.13.html +30 -0
  7. data/docs/changelog-0.2.13.md +6 -0
  8. data/docs/changelog-0.3.html +19 -5
  9. data/docs/faq.html +51 -40
  10. data/docs/faq.md +3 -3
  11. data/docs/hidden_o_n_squared.md +10 -0
  12. data/docs/index.html +84 -396
  13. data/docs/markdown_syntax.html +139 -330
  14. data/docs/markdown_syntax.md +80 -93
  15. data/docs/maruku.html +84 -396
  16. data/docs/maruku.md +88 -158
  17. data/docs/proposal.html +13 -106
  18. data/docs/proposal.md +3 -3
  19. data/docs/todo.html +38 -28
  20. data/lib/maruku.rb +77 -11
  21. data/lib/maruku/attributes.rb +186 -0
  22. data/lib/maruku/defaults.rb +40 -0
  23. data/lib/maruku/errors_management.rb +55 -39
  24. data/lib/maruku/helpers.rb +156 -72
  25. data/lib/maruku/input/charsource.rb +319 -0
  26. data/lib/maruku/{html_helper.rb → input/html_helper.rb} +30 -9
  27. data/lib/maruku/input/linesource.rb +111 -0
  28. data/lib/maruku/input/parse_block.rb +562 -0
  29. data/lib/maruku/{parse_doc.rb → input/parse_doc.rb} +60 -28
  30. data/lib/maruku/{parse_span_better.rb → input/parse_span_better.rb} +226 -256
  31. data/lib/maruku/input/type_detection.rb +137 -0
  32. data/lib/maruku/maruku.rb +33 -0
  33. data/lib/maruku/{to_html.rb → output/to_html.rb} +151 -132
  34. data/lib/maruku/{to_latex.rb → output/to_latex.rb} +31 -35
  35. data/lib/maruku/{to_latex_entities.rb → output/to_latex_entities.rb} +25 -3
  36. data/lib/maruku/output/to_latex_strings.rb +64 -0
  37. data/lib/maruku/output/to_markdown.rb +164 -0
  38. data/lib/maruku/{to_s.rb → output/to_s.rb} +6 -0
  39. data/lib/maruku/string_utils.rb +12 -181
  40. data/lib/maruku/structures.rb +91 -67
  41. data/lib/maruku/structures_inspect.rb +78 -0
  42. data/lib/maruku/structures_iterators.rb +24 -2
  43. data/lib/maruku/tests/benchmark.rb +41 -9
  44. data/lib/maruku/tests/new_parser.rb +317 -286
  45. data/lib/maruku/tests/tests.rb +20 -0
  46. data/lib/maruku/toc.rb +64 -64
  47. data/lib/maruku/usage/example1.rb +33 -0
  48. data/lib/maruku/version.rb +8 -2
  49. data/tests/unittest/abbreviations.md +27 -16
  50. data/tests/unittest/attributes/attributes.md +89 -0
  51. data/tests/unittest/attributes/circular.md +51 -0
  52. data/tests/unittest/attributes/default.md +47 -0
  53. data/tests/unittest/blank.md +10 -6
  54. data/tests/unittest/blanks_in_code.md +26 -26
  55. data/tests/unittest/code.md +9 -9
  56. data/tests/unittest/code2.md +12 -13
  57. data/tests/unittest/code3.md +34 -34
  58. data/tests/unittest/easy.md +9 -7
  59. data/tests/unittest/email.md +9 -7
  60. data/tests/unittest/encoding/iso-8859-1.md +41 -4
  61. data/tests/unittest/encoding/utf-8.md +6 -5
  62. data/tests/unittest/entities.md +52 -80
  63. data/tests/unittest/escaping.md +47 -35
  64. data/tests/unittest/extra_dl.md +19 -29
  65. data/tests/unittest/extra_header_id.md +31 -24
  66. data/tests/unittest/extra_table1.md +14 -32
  67. data/tests/unittest/footnotes.md +58 -42
  68. data/tests/unittest/headers.md +11 -11
  69. data/tests/unittest/hrule.md +14 -24
  70. data/tests/unittest/images.md +41 -26
  71. data/tests/unittest/inline_html.md +104 -56
  72. data/tests/unittest/inline_html2.md +38 -0
  73. data/tests/unittest/links.md +74 -33
  74. data/tests/unittest/list1.md +18 -15
  75. data/tests/unittest/list2.md +31 -13
  76. data/tests/unittest/list3.md +29 -28
  77. data/tests/unittest/list4.md +103 -12
  78. data/tests/unittest/lists.md +86 -53
  79. data/tests/unittest/lists6.md +53 -0
  80. data/tests/unittest/lists7.md +31 -0
  81. data/tests/unittest/lists_after_paragraph.md +105 -71
  82. data/tests/unittest/lists_ol.md +149 -73
  83. data/tests/unittest/misc_sw.md +366 -326
  84. data/tests/unittest/notyet/escape.md +10 -10
  85. data/tests/unittest/notyet/header_after_par.md +20 -14
  86. data/tests/unittest/notyet/ticks.md +8 -35
  87. data/tests/unittest/notyet/triggering.md +72 -45
  88. data/tests/unittest/olist.md +78 -0
  89. data/tests/unittest/one.md +5 -3
  90. data/tests/unittest/paragraph.md +5 -3
  91. data/tests/unittest/paragraph_rules/dont_merge_ref.md +15 -9
  92. data/tests/unittest/paragraph_rules/tab_is_blank.md +9 -5
  93. data/tests/unittest/paragraphs.md +21 -26
  94. data/tests/unittest/recover/recover_links.md +6 -5
  95. data/tests/unittest/references/long_example.md +39 -30
  96. data/tests/unittest/references/spaces_and_numbers.md +2 -2
  97. data/tests/unittest/syntax_hl.md +33 -31
  98. data/tests/unittest/test.md +4 -6
  99. data/tests/unittest/wrapping.md +43 -26
  100. metadata +160 -139
  101. data/docs/markdown_extra2.html +0 -87
  102. data/docs/markdown_extra2.md +0 -83
  103. data/docs/markdown_syntax_2.html +0 -152
  104. data/lib/maruku/parse_block.rb +0 -564
  105. data/lib/maruku/parse_span.rb +0 -451
  106. data/lib/maruku/to_latex_strings.rb +0 -59
  107. data/lib/maruku/to_markdown.rb +0 -110
  108. 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
- 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
- ] , {:css=>"style.css"})
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 to_s ***
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
- ><p>First Header | Second Header
56
+ ><p>First Header | Second Header
75
57
  ------------- | -------------
76
- Content Cell | Content Cell
77
- Content Cell | Content Cell</p
78
- >
58
+ Content Cell | Content Cell
59
+ Content Cell | Content Cell</p
60
+ >
@@ -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
- md_foot_ref("^b"),
27
- " and another ",
28
- md_foot_ref("^c"),
29
- " and another ",
30
- md_foot_ref("^a"),
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
- md_par(["This is not a footnote."])
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&apos;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
- <div class='footnotes'>
42
- <hr />
43
-
44
- <ol>
45
- <li id='fn:1'>
46
- <p>And that&apos;s the footnote. This is second sentence (same paragraph)<a href='#fnref:1' rev='footnote'>&#8617;</a></p>
47
- </li>
48
-
49
- <li id='fn:2'>
51
+ <div class='footnotes'><hr /><ol><li id='fn:1'>
52
+ <p>And that&apos;s the footnote. This is second sentence (same paragraph)</p>
53
+ <a href='#fnref:1' rev='footnote'>&#8617;</a></li><li id='fn:2'>
50
54
  <p>This is the very long one.</p>
51
55
 
52
- <p>That&apos;s the second paragraph.<a href='#fnref:2' rev='footnote'>&#8617;</a></p>
53
- </li>
54
-
55
- <li id='fn:3'>
56
+ <p>That&apos;s the second paragraph.</p>
57
+ <a href='#fnref:2' rev='footnote'>&#8617;</a></li><li id='fn:3'>
56
58
  <p>And that&apos;s the footnote.</p>
57
59
 
58
- <p>That&apos;s the second paragraph of the footnote.<a href='#fnref:3' rev='footnote'>&#8617;</a></p>
59
- </li>
60
- </ol>
61
- </div>
62
-
60
+ <p>That&apos;s the second paragraph of the footnote.</p>
61
+ <a href='#fnref:3' rev='footnote'>&#8617;</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
- ><p>[^a]: And that's the footnote.</p
107
- ><pre
108
- ><code>That's the second paragraph of the footnote.
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
- ></pre
111
- ><p>[^b]: And that's the footnote.
126
+ ></pre
127
+ ><p>[^b]: And that's the footnote.
112
128
  This is second sentence (same paragraph).</p
113
- ><p>[^c]:
114
- This is the very long one.</p
115
- ><pre
116
- ><code>That's the second paragraph.
129
+ ><p>[^c]:
130
+ This is the very long one.</p
131
+ ><pre
132
+ ><code>That's the second paragraph.
117
133
  </code
118
- ></pre
119
- ><p>This is not a footnote.</p
120
- >
134
+ ></pre
135
+ ><p>This is not a footnote.</p
136
+ >
@@ -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"])] , {:id=>"a_title_with_emphasis", :level=>1}),
19
- md_el(:header,["A title with ", md_em(["emphasis"])] , {:id=>"a_title_with_emphasis", :level=>2}),
20
- md_el(:header,["A title with ", md_em(["emphasis"])] , {:id=>"a_title_with_emphasis", :level=>4})
21
- ] , {:title=>"A title with emphasis"})
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 to_s ***
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
- ></h1
60
- ><h2>A title with <em>emphasis</em
61
- ></h2
62
- ><h4>A title with <em>emphasis</em
63
- ></h4
64
- >
59
+ ></h1
60
+ ><h2>A title with <em>emphasis</em
61
+ ></h2
62
+ ><h4>A title with <em>emphasis</em
63
+ ></h4
64
+ >
@@ -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
- md_el(:hrule,[] ),
20
- md_el(:hrule,[] ),
21
- md_el(:hrule,[] ),
22
- md_el(:hrule,[] )
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 to_s ***
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
- ><hr/
74
- ><hr/
75
- ><hr/
76
- ><hr/
77
- >
62
+ <hr
63
+ /><hr
64
+ /><hr
65
+ /><hr
66
+ /><hr
67
+ />
@@ -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
- md_im_image(["Cascading Style Sheets"], "http://jigsaw.w3.org/css-validator/images/vcss" )
31
+ md_im_image(["Cascading Style Sheets"], "http://jigsaw.w3.org/css-validator/images/vcss", nil)
32
32
  ]),
33
- md_par([
33
+ md_par([
34
34
  "Please mouseover to see the title: ",
35
- md_im_image(["Cascading Style Sheets"], "http://jigsaw.w3.org/css-validator/images/vcss" , "Title ok!")
35
+ md_im_image(["Cascading Style Sheets"], "http://jigsaw.w3.org/css-validator/images/vcss", "Title ok!")
36
36
  ]),
37
- md_par([
37
+ md_par([
38
38
  "Please mouseover to see the title: ",
39
- md_im_image(["Cascading Style Sheets"], "http://jigsaw.w3.org/css-validator/images/vcss" , "Title ok!")
39
+ md_im_image(["Cascading Style Sheets"], "http://jigsaw.w3.org/css-validator/images/vcss", "Title ok!")
40
40
  ]),
41
- md_par([
41
+ md_par([
42
42
  "I'll say it one more time: this page does not use ",
43
- md_image(["Cascading Style Sheets"],"css")
43
+ md_image(["Cascading Style Sheets"], "css")
44
44
  ]),
45
- md_par([
45
+ md_par([
46
46
  "This is double size: ",
47
- md_image(["Cascading Style Sheets"],"css2")
47
+ md_image(["Cascading Style Sheets"], "css2")
48
48
  ]),
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
- ] )
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 to_s ***
77
- 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
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
- ></p
105
- ><p>Please mouseover to see the title: <img title='Title ok!' src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Cascading Style Sheets'/
106
- ></p
107
- ><p>Please mouseover to see the title: <img title='Title ok!' src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Cascading Style Sheets'/
108
- ></p
109
- ><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'/
110
- ></p
111
- ><p>This is double size: ![Cascading Style Sheets] [css2]</p
112
- ><p>[css2]: http://jigsaw.w3.org/css-validator/images/vcss "Optional title attribute" class=external
113
- style="border:0;width:188px;height:131px"</p
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
- <em>Emphasis</em>
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
- "Input: ",
52
- md_html("<em>Emphasis</em>"),
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
- md_par(["Result alone: "]),
63
- md_html("<img src=\"http://jigsaw.w3.org/css-validator/images/vcss\" />"),
64
- md_par(["Without closing:"]),
65
- md_html("<img src=\"http://jigsaw.w3.org/css-validator/images/vcss\" />"),
66
- 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</div>"),
67
- 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>"),
68
- md_par(["The following is invalid HTML, and will generate an error:"]),
69
- 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>"),
70
- md_html("</table>")
71
- ] , {:css=>"style.css"})
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: <em>Emphasis</em> Result: <em>Emphasis</em></p>
78
+ <p>Input:</p>
79
+ <pre><code>&lt;em&gt;Emphasis&lt;/em&gt;
80
+ </code></pre>
81
+ <p>Result: <em>Emphasis</em></p>
75
82
 
76
- <p>Input: <img src='http://jigsaw.w3.org/css-validator/images/vcss' /> Result on span: <img src='http://jigsaw.w3.org/css-validator/images/vcss' /></p>
83
+ <p>Input:</p>
84
+ <pre><code>&lt;img src=&quot;http://jigsaw.w3.org/css-validator/images/vcss&quot;/&gt;
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: </p>
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 (no paragraph)</p>
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
  &lt;table&gt;
107
106
  &lt;td markdown=&quot;1&quot;&gt;This is *true* markdown text. (no par)&lt;/td&gt;
108
107
  &lt;td markdown=&quot;block&quot;&gt;This is *true* markdown text. (par)&lt;/td&gt;
109
- &lt;/tr&gt;</pre>
110
-
111
- <pre class='markdown-html-error' style='border: solid 3px red; background-color: pink'>HTML parse error:
108
+ &lt;/tr&gt;</pre><pre class='markdown-html-error' style='border: solid 3px red; background-color: pink'>HTML parse error:
112
109
  &lt;/table&gt;</pre>
113
-
114
110
  *** Output of to_latex ***
115
- Input: {\bf Raw HTML removed in latex version } Result: {\bf Raw HTML removed in latex version }
111
+ Input:
116
112
 
117
- Input: {\bf Raw HTML removed in latex version } Result on span: {\bf Raw HTML removed in latex version }
113
+ \begin{verbatim}<em>Emphasis</em>
114
+ \end{verbatim}
115
+ Result: {\bf Raw HTML removed in latex version }
118
116
 
119
- Result alone:
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: Result: Input: Result on span: Result alone: Without closing:The following is invalid HTML, and will generate an error:
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
- <em>Emphasis</em>
143
- Result: <em>Emphasis</em></p>
160
+ <p>Input:</p>
161
+
162
+ <pre><code>&lt;em&gt;Emphasis&lt;/em&gt;
163
+ </code></pre>
164
+
165
+ <p>Result: <em>Emphasis</em></p>
166
+
167
+ <p>Input:</p>
144
168
 
145
- <p>Input:
146
- <img src="http://jigsaw.w3.org/css-validator/images/vcss"/>
147
- Result on span: <img src="http://jigsaw.w3.org/css-validator/images/vcss"/></p>
169
+ <pre><code>&lt;img src="http://jigsaw.w3.org/css-validator/images/vcss"/&gt;
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: