maruku 0.5.6 → 0.5.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. data/bin/maruku +16 -9
  2. data/bin/marutest +2 -0
  3. data/docs/maruku.md +0 -51
  4. data/lib/maruku/input/linesource.rb +1 -0
  5. data/lib/maruku/input/parse_block.rb +28 -19
  6. data/lib/maruku/input/parse_doc.rb +1 -0
  7. data/lib/maruku/output/to_html.rb +24 -8
  8. data/lib/maruku/output/to_latex.rb +1 -1
  9. data/lib/maruku/version.rb +1 -1
  10. data/tests/unittest/abbreviations.md +2 -12
  11. data/tests/unittest/alt.md +1 -10
  12. data/tests/unittest/attributes/att2.md +1 -3
  13. data/tests/unittest/attributes/att3.md +1 -11
  14. data/tests/unittest/attributes/attributes.md +1 -16
  15. data/tests/unittest/attributes/circular.md +1 -9
  16. data/tests/unittest/attributes/default.md +1 -10
  17. data/tests/unittest/blank.md +1 -9
  18. data/tests/unittest/blanks_in_code.md +1 -26
  19. data/tests/unittest/bug_def.md +1 -8
  20. data/tests/unittest/bug_table.md +1 -11
  21. data/tests/unittest/code.md +1 -14
  22. data/tests/unittest/code2.md +1 -16
  23. data/tests/unittest/code3.md +1 -26
  24. data/tests/unittest/data_loss.md +1 -12
  25. data/tests/unittest/easy.md +1 -11
  26. data/tests/unittest/email.md +3 -11
  27. data/tests/unittest/encoding/iso-8859-1.md +1 -9
  28. data/tests/unittest/encoding/utf-8.md +1 -7
  29. data/tests/unittest/entities.md +78 -35
  30. data/tests/unittest/escaping.md +5 -25
  31. data/tests/unittest/extra_dl.md +1 -10
  32. data/tests/unittest/extra_header_id.md +1 -18
  33. data/tests/unittest/extra_table1.md +1 -8
  34. data/tests/unittest/footnotes.md +1 -21
  35. data/tests/unittest/headers.md +1 -11
  36. data/tests/unittest/hex_entities.md +1 -8
  37. data/tests/unittest/hrule.md +1 -8
  38. data/tests/unittest/html2.md +1 -12
  39. data/tests/unittest/html3.md +1 -15
  40. data/tests/unittest/html4.md +1 -6
  41. data/tests/unittest/html5.md +1 -8
  42. data/tests/unittest/ie.md +32 -33
  43. data/tests/unittest/images.md +2 -19
  44. data/tests/unittest/images2.md +1 -10
  45. data/tests/unittest/inline_html.md +22 -145
  46. data/tests/unittest/inline_html2.md +1 -3
  47. data/tests/unittest/links.md +22 -8
  48. data/tests/unittest/links2.md +1 -8
  49. data/tests/unittest/list1.md +1 -19
  50. data/tests/unittest/list12.md +43 -0
  51. data/tests/unittest/list2.md +1 -21
  52. data/tests/unittest/list3.md +1 -29
  53. data/tests/unittest/list4.md +1 -19
  54. data/tests/unittest/lists.md +1 -59
  55. data/tests/unittest/lists10.md +2 -13
  56. data/tests/unittest/lists11.md +2 -28
  57. data/tests/unittest/lists6.md +1 -0
  58. data/tests/unittest/lists7.md +56 -8
  59. data/tests/unittest/lists7b.md +136 -0
  60. data/tests/unittest/lists8.md +1 -22
  61. data/tests/unittest/lists9.md +1 -21
  62. data/tests/unittest/lists_after_paragraph.md +3 -48
  63. data/tests/unittest/lists_ol.md +1 -81
  64. data/tests/unittest/loss.md +1 -4
  65. data/tests/unittest/math/equations.md +1 -14
  66. data/tests/unittest/math/inline.md +1 -15
  67. data/tests/unittest/math/math2.md +38 -12
  68. data/tests/unittest/math/notmath.md +1 -9
  69. data/tests/unittest/math/table.md +1 -9
  70. data/tests/unittest/math/table2.md +33 -10
  71. data/tests/unittest/misc_sw.md +1 -195
  72. data/tests/unittest/notyet/escape.md +3 -13
  73. data/tests/unittest/notyet/header_after_par.md +1 -11
  74. data/tests/unittest/notyet/ticks.md +2 -11
  75. data/tests/unittest/notyet/triggering.md +1 -32
  76. data/tests/unittest/olist.md +1 -15
  77. data/tests/unittest/one.md +1 -8
  78. data/tests/unittest/paragraph.md +1 -8
  79. data/tests/unittest/paragraph_rules/dont_merge_ref.md +1 -10
  80. data/tests/unittest/paragraph_rules/tab_is_blank.md +1 -9
  81. data/tests/unittest/paragraphs.md +1 -14
  82. data/tests/unittest/recover/recover_links.md +1 -6
  83. data/tests/unittest/references/long_example.md +1 -17
  84. data/tests/unittest/references/spaces_and_numbers.md +1 -0
  85. data/tests/unittest/smartypants.md +21 -6
  86. data/tests/unittest/syntax_hl.md +1 -24
  87. data/tests/unittest/table_attributes.md +1 -8
  88. data/tests/unittest/test.md +1 -5
  89. data/tests/unittest/wrapping.md +1 -18
  90. data/tests/unittest/xml.md +1 -15
  91. data/tests/unittest/xml2.md +1 -3
  92. data/tests/unittest/xml3.md +1 -9
  93. data/tests/unittest/xml_instruction.md +1 -10
  94. metadata +211 -215
@@ -17,13 +17,9 @@ md_el(:document,[
17
17
  md_el(:ald,[],{:ald=>[[:ref, "a"]],:ald_id=>"b"},[])
18
18
  ],{},[])
19
19
  *** Output of to_html ***
20
-
21
20
  <p>Paragraph</p>
22
-
23
21
  *** Output of to_latex ***
24
22
  Paragraph
25
-
26
-
27
23
  *** Output of to_md ***
28
24
  Paragraph
29
25
  *** Output of to_s ***
@@ -44,8 +40,4 @@ Paragraph
44
40
  {:b: a}</p>
45
41
 
46
42
  *** Output of Markdown.pl (parsed) ***
47
- <p>Paragraph
48
- {:a}</p
49
- ><p>{:a: b}
50
- {:b: a}</p
51
- >
43
+ Error: #<NoMethodError: private method `write_children' called for <div> ... </>:REXML::Element>
@@ -13,17 +13,11 @@ md_el(:document,[
13
13
  md_el(:ald,[],{:ald=>[[:class, "maruku-par"]],:ald_id=>"paragraph"},[])
14
14
  ],{},[])
15
15
  *** Output of to_html ***
16
-
17
16
  <p class='maruku-par' id='2'>Paragraph2</p>
18
-
19
17
  *** Output of to_latex ***
20
18
  Paragraph2
21
-
22
-
23
19
  *** Output of to_md ***
24
20
  Paragraph2
25
-
26
-
27
21
  *** Output of to_s ***
28
22
  Paragraph2
29
23
  *** EOF ***
@@ -41,7 +35,4 @@ Paragraph2
41
35
  <p>{paragraph}: .maruku-par</p>
42
36
 
43
37
  *** Output of Markdown.pl (parsed) ***
44
- <p>Paragraph2
45
- {#2}</p
46
- ><p>{paragraph}: .maruku-par</p
47
- >
38
+ Error: #<NoMethodError: private method `write_children' called for <div> ... </>:REXML::Element>
@@ -9,23 +9,17 @@ Linea 2
9
9
  *** Output of inspect ***
10
10
  md_el(:document,[md_par(["Linea 1"]), md_par(["Linea 2"])],{},[])
11
11
  *** Output of to_html ***
12
-
13
12
  <p>Linea 1</p>
14
13
 
15
14
  <p>Linea 2</p>
16
-
17
15
  *** Output of to_latex ***
18
16
  Linea 1
19
17
 
20
18
  Linea 2
21
-
22
-
23
19
  *** Output of to_md ***
24
20
  Linea 1
25
21
 
26
22
  Linea 2
27
-
28
-
29
23
  *** Output of to_s ***
30
24
  Linea 1Linea 2
31
25
  *** EOF ***
@@ -42,6 +36,4 @@ Linea 1Linea 2
42
36
  <p>Linea 2</p>
43
37
 
44
38
  *** Output of Markdown.pl (parsed) ***
45
- <p>Linea 1</p
46
- ><p>Linea 2</p
47
- >
39
+ Error: #<NoMethodError: private method `write_children' called for <div> ... </>:REXML::Element>
@@ -34,7 +34,6 @@ md_el(:document,[
34
34
  md_el(:code,[],{:raw_code=>"two"},[])
35
35
  ],{},[])
36
36
  *** Output of to_html ***
37
-
38
37
  <p>This block is composed of three lines:</p>
39
38
 
40
39
  <pre><code>one
@@ -51,7 +50,6 @@ four</code></pre>
51
50
  <p>This block is composed of 2</p>
52
51
 
53
52
  <pre><code>two</code></pre>
54
-
55
53
  *** Output of to_latex ***
56
54
  This block is composed of three lines:
57
55
 
@@ -67,15 +65,12 @@ four\end{verbatim}
67
65
  This block is composed of 2
68
66
 
69
67
  \begin{verbatim}two\end{verbatim}
70
-
71
68
  *** Output of to_md ***
72
69
  This block is composed of three lines:
73
70
 
74
71
  This block is composed of 5
75
72
 
76
73
  This block is composed of 2
77
-
78
-
79
74
  *** Output of to_s ***
80
75
  This block is composed of three lines:This block is composed of 5This block is composed of 2
81
76
  *** EOF ***
@@ -108,24 +103,4 @@ four
108
103
  </code></pre>
109
104
 
110
105
  *** Output of Markdown.pl (parsed) ***
111
- <p>This block is composed of three lines:</p
112
- ><pre
113
- ><code>one
114
-
115
- three
116
- </code
117
- ></pre
118
- ><p>This block is composed of 5</p
119
- ><pre
120
- ><code>one
121
-
122
-
123
- four
124
- </code
125
- ></pre
126
- ><p>This block is composed of 2</p
127
- ><pre
128
- ><code>two
129
- </code
130
- ></pre
131
- >
106
+ Error: #<NoMethodError: private method `write_children' called for <div> ... </>:REXML::Element>
@@ -7,17 +7,11 @@ Write a comment here
7
7
  *** Output of inspect ***
8
8
  md_el(:document,[md_par([md_link(["test"],"test"), ":"])],{},[])
9
9
  *** Output of to_html ***
10
-
11
10
  <p><span>test</span>:</p>
12
-
13
11
  *** Output of to_latex ***
14
12
  test:
15
-
16
-
17
13
  *** Output of to_md ***
18
14
  test:
19
-
20
-
21
15
  *** Output of to_s ***
22
16
  test:
23
17
  *** EOF ***
@@ -32,5 +26,4 @@ test:
32
26
  <p>[test][]:</p>
33
27
 
34
28
  *** Output of Markdown.pl (parsed) ***
35
- <p>[test][]:</p
36
- >
29
+ Error: #<NoMethodError: private method `write_children' called for <div> ... </>:REXML::Element>
@@ -27,7 +27,6 @@ md_el(:document,[
27
27
  md_el(:ald,[],{:ald=>[["scope", "row"]],:ald_id=>"t"},[])
28
28
  ],{},[])
29
29
  *** Output of to_html ***
30
-
31
30
  <p class='class1' style='color:red'>hello</p>
32
31
  <table class='class1' summary='Table summary' style='color:red'><thead><tr><th>h</th><th>h</th></tr></thead><tbody><tr><th scope='row' style='text-align: left;'> c1</th><td style='text-align: left;'>c2</td>
33
32
  </tr></tbody></table>
@@ -39,8 +38,6 @@ h&h\\
39
38
  \hline
40
39
  c1&c2\\
41
40
  \end{tabular}
42
-
43
-
44
41
  *** Output of to_md ***
45
42
  hello
46
43
 
@@ -67,11 +64,4 @@ hellohh c1c2
67
64
  <p>{:t: scope="row"}</p>
68
65
 
69
66
  *** Output of Markdown.pl (parsed) ***
70
- <p>hello
71
- {: summary="Table summary" .class1 style="color:red"}</p
72
- ><p>h | h
73
- ----------|--
74
- {:t} c1 | c2
75
- {: summary="Table summary" .class1 style="color:red"}</p
76
- ><p>{:t: scope="row"}</p
77
- >
67
+ Error: #<NoMethodError: private method `write_children' called for <div> ... </>:REXML::Element>
@@ -15,14 +15,12 @@ md_el(:document,[
15
15
  md_el(:code,[],{:raw_code=>"tell application \"Foo\"\n beep\nend tell\n\ttab"},[])
16
16
  ],{},[])
17
17
  *** Output of to_html ***
18
-
19
18
  <p>Here is an example of AppleScript:</p>
20
19
 
21
20
  <pre><code>tell application &quot;Foo&quot;
22
21
  beep
23
22
  end tell
24
23
  tab</code></pre>
25
-
26
24
  *** Output of to_latex ***
27
25
  Here is an example of AppleScript:
28
26
 
@@ -30,11 +28,8 @@ Here is an example of AppleScript:
30
28
  beep
31
29
  end tell
32
30
  tab\end{verbatim}
33
-
34
31
  *** Output of to_md ***
35
32
  Here is an example of AppleScript:
36
-
37
-
38
33
  *** Output of to_s ***
39
34
  Here is an example of AppleScript:
40
35
  *** EOF ***
@@ -55,12 +50,4 @@ end tell
55
50
  </code></pre>
56
51
 
57
52
  *** Output of Markdown.pl (parsed) ***
58
- <p>Here is an example of AppleScript:</p
59
- ><pre
60
- ><code>tell application "Foo"
61
- beep
62
- end tell
63
- tab
64
- </code
65
- ></pre
66
- >
53
+ Error: #<NoMethodError: private method `write_children' called for <div> ... </>:REXML::Element>
@@ -10,13 +10,11 @@ md_el(:document,[
10
10
  md_el(:quote,[md_par(["Code"]), md_el(:code,[],{:raw_code=>"Ciao"},[])],{},[])
11
11
  ],{},[])
12
12
  *** Output of to_html ***
13
-
14
13
  <blockquote>
15
14
  <p>Code</p>
16
15
 
17
16
  <pre><code>Ciao</code></pre>
18
17
  </blockquote>
19
-
20
18
  *** Output of to_latex ***
21
19
  \begin{quote}%
22
20
  Code
@@ -24,11 +22,8 @@ Code
24
22
  \begin{verbatim}Ciao\end{verbatim}
25
23
 
26
24
  \end{quote}
27
-
28
25
  *** Output of to_md ***
29
26
  Code
30
-
31
-
32
27
  *** Output of to_s ***
33
28
  Code
34
29
  *** EOF ***
@@ -48,14 +43,4 @@ Code
48
43
  </blockquote>
49
44
 
50
45
  *** Output of Markdown.pl (parsed) ***
51
- <blockquote>
52
- <p>Code</p
53
- >
54
-
55
- <pre
56
- ><code>Ciao
57
- </code
58
- ></pre
59
- >
60
- </blockquote
61
- >
46
+ Error: #<NoMethodError: private method `write_children' called for <div> ... </>:REXML::Element>
@@ -31,7 +31,6 @@ md_el(:document,[
31
31
  md_el(:code,[],{:raw_code=>"Code"},[])
32
32
  ],{},[])
33
33
  *** Output of to_html ***
34
-
35
34
  <p>This is code (4 spaces):</p>
36
35
 
37
36
  <pre><code>Code</code></pre>
@@ -47,7 +46,6 @@ md_el(:document,[
47
46
  <p>This is not code</p>
48
47
 
49
48
  <pre><code>Code</code></pre>
50
-
51
49
  *** Output of to_latex ***
52
50
  This is code (4 spaces):
53
51
 
@@ -61,7 +59,6 @@ This is code (1 tab):
61
59
  This is not code
62
60
 
63
61
  \begin{verbatim}Code\end{verbatim}
64
-
65
62
  *** Output of to_md ***
66
63
  This is code (4 spaces):
67
64
 
@@ -70,8 +67,6 @@ This is not code
70
67
  This is code (1 tab):
71
68
 
72
69
  This is not code
73
-
74
-
75
70
  *** Output of to_s ***
76
71
  This is code (4 spaces):This is not codeThis is code (1 tab):This is not code
77
72
  *** EOF ***
@@ -104,24 +99,4 @@ This is code (4 spaces):This is not codeThis is code (1 tab):This is not code
104
99
  </code></pre>
105
100
 
106
101
  *** Output of Markdown.pl (parsed) ***
107
- <p>This is code (4 spaces):</p
108
- ><pre
109
- ><code>Code
110
- </code
111
- ></pre
112
- ><p>This is not code</p
113
- ><pre
114
- ><code>Code
115
- </code
116
- ></pre
117
- ><p>This is code (1 tab):</p
118
- ><pre
119
- ><code>Code
120
- </code
121
- ></pre
122
- ><p>This is not code</p
123
- ><pre
124
- ><code>Code
125
- </code
126
- ></pre
127
- >
102
+ Error: #<NoMethodError: private method `write_children' called for <div> ... </>:REXML::Element>
@@ -11,21 +11,16 @@ md_el(:document,[
11
11
  md_el(:ol,[md_el(:li_span,["abcd efgh ijkl"],{:want_my_paragraph=>false},[])],{},[])
12
12
  ],{},[])
13
13
  *** Output of to_html ***
14
-
15
14
  <ol>
16
15
  <li>abcd efgh ijkl</li>
17
16
  </ol>
18
-
19
17
  *** Output of to_latex ***
20
18
  \begin{enumerate}%
21
19
  \item abcd efgh ijkl
22
20
 
23
21
  \end{enumerate}
24
-
25
22
  *** Output of to_md ***
26
23
  1. abcd efgh ijkl
27
-
28
-
29
24
  *** Output of to_s ***
30
25
  abcd efgh ijkl
31
26
  *** EOF ***
@@ -44,10 +39,4 @@ ijkl</li>
44
39
  </ol>
45
40
 
46
41
  *** Output of Markdown.pl (parsed) ***
47
- <ol>
48
- <li>abcd
49
- efgh
50
- ijkl</li
51
- >
52
- </ol
53
- >
42
+ Error: #<NoMethodError: private method `write_children' called for <div> ... </>:REXML::Element>
@@ -6,17 +6,11 @@ Simple test for emphasis.
6
6
  *** Output of inspect ***
7
7
  md_el(:document,[md_par([md_em(["Hello!"]), " how are ", md_strong(["you"]), "?"])],{},[])
8
8
  *** Output of to_html ***
9
-
10
9
  <p><em>Hello!</em> how are <strong>you</strong>?</p>
11
-
12
10
  *** Output of to_latex ***
13
11
  \emph{Hello!} how are \textbf{you}?
14
-
15
-
16
12
  *** Output of to_md ***
17
13
  Hello!how are you?
18
-
19
-
20
14
  *** Output of to_s ***
21
15
  Hello! how are you?
22
16
  *** EOF ***
@@ -31,8 +25,4 @@ Hello! how are you?
31
25
  <p><em>Hello!</em> how are <strong>you</strong>?</p>
32
26
 
33
27
  *** Output of Markdown.pl (parsed) ***
34
- <p
35
- ><em>Hello!</em
36
- > how are <strong>you</strong
37
- >?</p
38
- >
28
+ Error: #<NoMethodError: private method `write_children' called for <div> ... </>:REXML::Element>
@@ -11,19 +11,13 @@ md_el(:document,[
11
11
  md_par(["This is an email address: ", md_email("andrea@invalid.it")])
12
12
  ],{},[])
13
13
  *** Output of to_html ***
14
-
15
14
  <p>This is an email address: <a href='mailto:andrea@invalid.it'>&#097;&#110;&#100;&#114;&#101;&#097;&#064;&#105;&#110;&#118;&#097;&#108;&#105;&#100;&#046;&#105;&#116;</a></p>
16
-
17
15
  *** Output of to_latex ***
18
16
  This is an email address: \href{mailto:andrea@invalid.it}{andrea\char64invalid\char46it}
19
-
20
-
21
17
  *** Output of to_md ***
22
18
  This is an email address:
23
-
24
-
25
19
  *** Output of to_s ***
26
- This is an email address:
20
+ This is an email address:
27
21
  *** EOF ***
28
22
 
29
23
 
@@ -33,9 +27,7 @@ This is an email address:
33
27
 
34
28
 
35
29
  *** Output of Markdown.pl ***
36
- <p>This is an email address: <a href="&#x6D;&#x61;&#x69;&#x6C;&#x74;&#111;:&#x61;&#110;&#100;&#114;e&#97;&#64;&#x69;n&#118;&#x61;&#108;&#105;&#x64;&#46;&#x69;&#116;">&#x61;&#110;&#100;&#114;e&#97;&#64;&#x69;n&#118;&#x61;&#108;&#105;&#x64;&#46;&#x69;&#116;</a></p>
30
+ <p>This is an email address: <a href="&#109;&#97;&#105;&#x6C;&#116;&#x6F;:a&#x6E;&#x64;&#114;&#x65;&#x61;&#64;&#x69;&#x6E;&#118;a&#x6C;&#x69;&#100;&#x2E;&#x69;&#x74;">a&#x6E;&#x64;&#114;&#x65;&#x61;&#64;&#x69;&#x6E;&#118;a&#x6C;&#x69;&#100;&#x2E;&#x69;&#x74;</a></p>
37
31
 
38
32
  *** Output of Markdown.pl (parsed) ***
39
- <p>This is an email address: <a href='&amp;#x6D;&amp;#x61;&amp;#x69;&amp;#x6C;&amp;#x74;&amp;#111;:&amp;#x61;&amp;#110;&amp;#100;&amp;#114;e&amp;#97;&amp;#64;&amp;#x69;n&amp;#118;&amp;#x61;&amp;#108;&amp;#105;&amp;#x64;&amp;#46;&amp;#x69;&amp;#116;'>&#x61;&#110;&#100;&#114;e&#97;&#64;&#x69;n&#118;&#x61;&#108;&#105;&#x64;&#46;&#x69;&#116;</a
40
- ></p
41
- >
33
+ Error: #<NoMethodError: private method `write_children' called for <div> ... </>:REXML::Element>
@@ -13,18 +13,12 @@ md_el(:document,[
13
13
  ])
14
14
  ],{},[])
15
15
  *** Output of to_html ***
16
-
17
16
  <p>This is iso-8859-1: àèìàù.</p>
18
-
19
17
  *** Output of to_latex ***
20
18
  This is iso-8859-1: àèìàù.
21
-
22
-
23
19
  *** Output of to_md ***
24
20
  This is iso-8859-1:
25
21
  àèìàù.
26
-
27
-
28
22
  *** Output of to_s ***
29
23
  This is iso-8859-1: àèìàù.
30
24
  *** EOF ***
@@ -41,6 +35,4 @@ This is iso-8859-1: àèìàù.
41
35
  <p>This is iso-8859-1: àèìàù.</p>
42
36
 
43
37
  *** Output of Markdown.pl (parsed) ***
44
- <p>Encoding: iso-8859-1</p
45
- ><p>This is iso-8859-1: àèìàù.</p
46
- >
38
+ Error: #<NoMethodError: private method `write_children' called for <div> ... </>:REXML::Element>