maruku 0.3.0 → 0.4.0

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.
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
@@ -1,9 +1,46 @@
1
1
  Encoding: iso-8859-1
2
2
 
3
- ***Markdown input:***
4
-
5
- ***Markdown input:***
3
+ *** Parameters: ***
4
+ {}
5
+ *** Markdown input: ***
6
6
  Encoding: iso-8859-1
7
7
 
8
8
  This is iso-8859-1: àèìàù.
9
- ***Output of inspect***
9
+ *** Output of inspect ***
10
+ md_el(:document,[
11
+ md_par([
12
+ "This is iso-8859-1: \303\203\302\240\303\203\302\250\303\203\302\254\303\203\302\240\303\203\302\271."
13
+ ])
14
+ ],{},[])
15
+ *** Output of to_html ***
16
+
17
+ <p>This is iso-8859-1: àèìàù.</p>
18
+
19
+ *** Output of to_latex ***
20
+ This is iso-8859-1: àèìàù.
21
+
22
+
23
+ *** Output of to_md ***
24
+ This is iso-8859-1:
25
+ àèìàù.
26
+
27
+
28
+ *** Output of to_s ***
29
+ This is iso-8859-1: àèìàù.
30
+ *** EOF ***
31
+
32
+
33
+
34
+ OK!
35
+
36
+
37
+
38
+ *** Output of Markdown.pl ***
39
+ <p>Encoding: iso-8859-1</p>
40
+
41
+ <p>This is iso-8859-1: àèìàù.</p>
42
+
43
+ *** Output of Markdown.pl (parsed) ***
44
+ <p>Encoding: iso-8859-1</p
45
+ ><p>This is iso-8859-1: àèìàù.</p
46
+ >
@@ -7,18 +7,19 @@ Italian: àèìòù.
7
7
  Japanese: マルク
8
8
 
9
9
  *** Output of inspect ***
10
- md_el(:document,[md_par(["Japanese: \343\203\236\343\203\253\343\202\257"])] , {:italian=>"\303\240\303\250\303\254\303\262\303\271."})
10
+ md_el(:document,[md_par(["Japanese: \343\203\236\343\203\253\343\202\257"])],{},[])
11
11
  *** Output of to_html ***
12
- <p>Japanese: マルク</p
13
- >
12
+
13
+ <p>Japanese: マルク</p>
14
+
14
15
  *** Output of to_latex ***
15
16
  Japanese: マルク
16
17
 
17
18
 
18
- *** Output of to_s ***
19
- Japanese: マルク
20
19
  *** Output of to_md ***
21
20
  Japanese: マルク
21
+ *** Output of to_s ***
22
+ Japanese: マルク
22
23
  *** EOF ***
23
24
 
24
25
 
@@ -25,74 +25,36 @@ It should read just like this: `&copy;`.
25
25
  *** Output of inspect ***
26
26
  md_el(:document,[
27
27
  md_par(["Maruku translates HTML entities to the equivalent in LaTeX:"]),
28
- md_el(:table,[
29
- md_el(:head_cell,["Entity"] ),
30
- md_el(:head_cell,["Result"] ),
31
- md_el(:cell,[md_code("&copy;")] ),
32
- md_el(:cell,[md_entity("copy")] ),
33
- md_el(:cell,[md_code("&pound;")] ),
34
- md_el(:cell,[md_entity("pound")] ),
35
- md_el(:cell,[md_code("a&nbsp;b")] ),
36
- md_el(:cell,["a", md_entity("nbsp"), "b"] ),
37
- md_el(:cell,[md_code("&lambda;")] ),
38
- md_el(:cell,[md_entity("lambda")] ),
39
- md_el(:cell,[md_code("&mdash;")] ),
40
- md_el(:cell,[md_entity("mdash")] )
41
- ] , {:align=>[:left, :left]}),
42
- md_par([
28
+ md_el(:table,[
29
+ md_el(:head_cell,["Entity"],{},[]),
30
+ md_el(:head_cell,["Result"],{},[]),
31
+ md_el(:cell,[md_code("&copy;")],{},[]),
32
+ md_el(:cell,[md_entity("copy")],{},[]),
33
+ md_el(:cell,[md_code("&pound;")],{},[]),
34
+ md_el(:cell,[md_entity("pound")],{},[]),
35
+ md_el(:cell,[md_code("a&nbsp;b")],{},[]),
36
+ md_el(:cell,["a", md_entity("nbsp"), "b"],{},[]),
37
+ md_el(:cell,[md_code("&lambda;")],{},[]),
38
+ md_el(:cell,[md_entity("lambda")],{},[]),
39
+ md_el(:cell,[md_code("&mdash;")],{},[]),
40
+ md_el(:cell,[md_entity("mdash")],{},[])
41
+ ],{:align=>[:left, :left]},[]),
42
+ md_par([
43
43
  "Entity-substitution does not happen in code blocks or inline code."
44
44
  ]),
45
- md_par(["The following should not be translated:"]),
46
- md_el(:code,[] , {:raw_code=>"&copy;\n"}),
47
- md_par(["It should read just like this: ", md_code("&copy;"), "."])
48
- ] )
45
+ md_par(["The following should not be translated:"]),
46
+ md_el(:code,[],{:raw_code=>"&copy;\n"},[]),
47
+ md_par(["It should read just like this: ", md_code("&copy;"), "."])
48
+ ],{},[])
49
49
  *** Output of to_html ***
50
50
 
51
51
  <p>Maruku translates HTML entities to the equivalent in LaTeX:</p>
52
-
53
- <table>
54
- <thead>
55
- <tr><th>Entity</th><th>Result</th></tr>
56
- </thead>
57
- <tbody>
58
- <tr>
59
- <td style='text-align: left;'><code>&amp;copy;</code></td>
60
-
61
- <td style='text-align: left;'>&copy;</td>
62
- </tr>
63
-
64
- <tr>
65
- <td style='text-align: left;'><code>&amp;pound;</code></td>
66
-
67
- <td style='text-align: left;'>&pound;</td>
68
- </tr>
69
-
70
- <tr>
71
- <td style='text-align: left;'><code>a&amp;nbsp;b</code></td>
72
-
73
- <td style='text-align: left;'>a&nbsp;b</td>
74
- </tr>
75
-
76
- <tr>
77
- <td style='text-align: left;'><code>&amp;lambda;</code></td>
78
-
79
- <td style='text-align: left;'>&lambda;</td>
80
- </tr>
81
-
82
- <tr>
83
- <td style='text-align: left;'><code>&amp;mdash;</code></td>
84
-
85
- <td style='text-align: left;'>&mdash;</td>
86
- </tr>
87
- </tbody></table>
88
-
52
+ <table><thead><tr><th>Entity</th><th>Result</th></tr></thead><tbody><tr><td style='text-align: left;'><code>&amp;copy;</code></td><td style='text-align: left;'>&copy;</td></tr><tr><td style='text-align: left;'><code>&amp;pound;</code></td><td style='text-align: left;'>&pound;</td></tr><tr><td style='text-align: left;'><code>a&amp;nbsp;b</code></td><td style='text-align: left;'>a&nbsp;b</td></tr><tr><td style='text-align: left;'><code>&amp;lambda;</code></td><td style='text-align: left;'>&lambda;</td></tr><tr><td style='text-align: left;'><code>&amp;mdash;</code></td><td style='text-align: left;'>&mdash;</td></tr></tbody></table>
89
53
  <p>Entity-substitution does not happen in code blocks or inline code.</p>
90
54
 
91
55
  <p>The following should not be translated:</p>
92
-
93
56
  <pre><code>&amp;copy;
94
57
  </code></pre>
95
-
96
58
  <p>It should read just like this: <code>&amp;copy;</code>.</p>
97
59
 
98
60
  *** Output of to_latex ***
@@ -101,11 +63,11 @@ Maruku translates HTML entities to the equivalent in \LaTeX\xspace :
101
63
  \begin{tabular}{l|l}
102
64
  Entity&Result\\
103
65
  \hline
104
- \colorbox[rgb]{0.94,0.94,0.88}{\tt \char38\char99\char111\char112\char121\char59}&\copyright\\
105
- \colorbox[rgb]{0.94,0.94,0.88}{\tt \char38\char112\char111\char117\char110\char100\char59}&\pounds\\
106
- \colorbox[rgb]{0.94,0.94,0.88}{\tt \char97\char38\char110\char98\char115\char112\char59\char98}&a~b\\
107
- \colorbox[rgb]{0.94,0.94,0.88}{\tt \char38\char108\char97\char109\char98\char100\char97\char59}&$\lambda$\\
108
- \colorbox[rgb]{0.94,0.94,0.88}{\tt \char38\char109\char100\char97\char115\char104\char59}&---\\
66
+ \colorbox[rgb]{1.00,0.67,1.00}{\tt \char38\char99\char111\char112\char121\char59}&\copyright\\
67
+ \colorbox[rgb]{1.00,0.67,1.00}{\tt \char38\char112\char111\char117\char110\char100\char59}&\pounds\\
68
+ \colorbox[rgb]{1.00,0.67,1.00}{\tt \char97\char38\char110\char98\char115\char112\char59\char98}&a~b\\
69
+ \colorbox[rgb]{1.00,0.67,1.00}{\tt \char38\char108\char97\char109\char98\char100\char97\char59}&$\lambda$\\
70
+ \colorbox[rgb]{1.00,0.67,1.00}{\tt \char38\char109\char100\char97\char115\char104\char59}&---\\
109
71
  \end{tabular}
110
72
 
111
73
  Entity-substitution does not happen in code blocks or inline code.
@@ -114,11 +76,21 @@ The following should not be translated:
114
76
 
115
77
  \begin{verbatim}&copy;
116
78
  \end{verbatim}
117
- It should read just like this: \colorbox[rgb]{0.94,0.94,0.88}{\tt \char38\char99\char111\char112\char121\char59}.
79
+ It should read just like this: \colorbox[rgb]{1.00,0.67,1.00}{\tt \char38\char99\char111\char112\char121\char59}.
80
+
81
+
82
+ *** Output of to_md ***
83
+ Maruku translates HTML entities to the
84
+ equivalent in LaTeX:
85
+
86
+ EntityResultabEntity-substitution does not happen in
87
+ code blocks or inline code.
88
+
89
+ The following should not be translated:
90
+
91
+ It should read just like this: .
118
92
 
119
93
 
120
- *** Output of to_s ***
121
- Maruku translates HTML entities to the equivalent in LaTeX:EntityResultabEntity-substitution does not happen in code blocks or inline code.The following should not be translated:It should read just like this: .
122
94
  *** Output of to_s ***
123
95
  Maruku translates HTML entities to the equivalent in LaTeX:EntityResultabEntity-substitution does not happen in code blocks or inline code.The following should not be translated:It should read just like this: .
124
96
  *** EOF ***
@@ -151,24 +123,24 @@ Maruku translates HTML entities to the equivalent in LaTeX:EntityResultabEntity-
151
123
 
152
124
  *** Output of Markdown.pl (parsed) ***
153
125
  <p>Maruku translates HTML entities to the equivalent in LaTeX:</p
154
- ><p>Entity | Result
126
+ ><p>Entity | Result
155
127
  ------------|----------
156
128
  <code>&amp;copy;</code
157
- > | &copy;
129
+ > | &copy;
158
130
  <code>&amp;pound;</code
159
- > | &pound;
131
+ > | &pound;
160
132
  <code>a&amp;nbsp;b</code
161
- > | a&nbsp;b
133
+ > | a&nbsp;b
162
134
  <code>&amp;lambda;</code
163
- > | &lambda;
135
+ > | &lambda;
164
136
  <code>&amp;mdash;</code
165
- > | &mdash;</p
166
- ><p>Entity-substitution does not happen in code blocks or inline code.</p
167
- ><p>The following should not be translated:</p
168
- ><pre
169
- ><code>&amp;copy;
137
+ > | &mdash;</p
138
+ ><p>Entity-substitution does not happen in code blocks or inline code.</p
139
+ ><p>The following should not be translated:</p
140
+ ><pre
141
+ ><code>&amp;copy;
170
142
  </code
171
- ></pre
172
- ><p>It should read just like this: <code>&amp;copy;</code
173
- >.</p
174
- >
143
+ ></pre
144
+ ><p>It should read just like this: <code>&amp;copy;</code
145
+ >.</p
146
+ >
@@ -15,25 +15,25 @@ This is ``Code with a special: -> ` <- ``(after)
15
15
  End of `paragraph `
16
16
  *** Output of inspect ***
17
17
  md_el(:document,[
18
- md_par([" Hello: ! ! ` { } [ ] ( ) # . ! * * *"]),
19
- md_par([
18
+ md_par(["Hello: ! ! ` { } [ ] ( ) # . ! * * *"]),
19
+ md_par([
20
20
  "Ora, ",
21
- md_em(["emphasis"]),
22
- ", ",
23
- md_strong(["bold"]),
24
- ", * <- due asterischi-> * , un underscore-> _ , ",
25
- md_em(["emphasis"]),
26
- ", incre",
27
- md_em(["dible"]),
28
- "e!"
21
+ md_em(["emphasis"]),
22
+ ", ",
23
+ md_strong(["bold"]),
24
+ ", * <- due asterischi-> * , un underscore-> _ , ",
25
+ md_em(["emphasis"]),
26
+ ", incre",
27
+ md_em(["dible"]),
28
+ "e!"
29
29
  ]),
30
- md_par(["This is ", md_code("Code with a special: -> ` <-"), "(after)"]),
31
- md_par([md_code("Start "), " of paragraph"]),
32
- md_par(["End of ", md_code("paragraph ")])
33
- ] , {:on_error=>:warning})
30
+ md_par(["This is ", md_code("Code with a special: -> ` <-"), "(after)"]),
31
+ md_par([md_code("Start "), " of paragraph"]),
32
+ md_par(["End of ", md_code("paragraph ")])
33
+ ],{},[])
34
34
  *** Output of to_html ***
35
35
 
36
- <p> Hello: ! ! ` { } [ ] ( ) # . ! * * *</p>
36
+ <p>Hello: ! ! ` { } [ ] ( ) # . ! * * *</p>
37
37
 
38
38
  <p>Ora, <em>emphasis</em>, <strong>bold</strong>, * &lt;- due asterischi-&gt; * , un underscore-&gt; _ , <em>emphasis</em>, incre<em>dible</em>e!</p>
39
39
 
@@ -44,21 +44,33 @@ md_el(:document,[
44
44
  <p>End of <code>paragraph </code></p>
45
45
 
46
46
  *** Output of to_latex ***
47
- Hello: ! ! ` \{ \} [ ] ( ) \# . ! * * *
47
+ Hello: ! ! ` \{ \} [ ] ( ) \# . ! * * *
48
48
 
49
49
  Ora, {\em emphasis}, {\bf bold}, * {\tt \char60}- due asterischi-{\tt \char62} * , un underscore-{\tt \char62} \_ , {\em emphasis}, incre{\em dible}e!
50
50
 
51
- This is \colorbox[rgb]{0.94,0.94,0.88}{\tt \char67\char111\char100\char101\char32\char119\char105\char116\char104\char32\char97\char32\char115\char112\char101\char99\char105\char97\char108\char58\char32\char45\char62\char32\char96\char32\char60\char45}(after)
51
+ This is \colorbox[rgb]{1.00,0.67,1.00}{\tt \char67\char111\char100\char101\char32\char119\char105\char116\char104\char32\char97\char32\char115\char112\char101\char99\char105\char97\char108\char58\char32\char45\char62\char32\char96\char32\char60\char45}(after)
52
52
 
53
- \colorbox[rgb]{0.94,0.94,0.88}{\tt \char83\char116\char97\char114\char116\char32} of paragraph
53
+ \colorbox[rgb]{1.00,0.67,1.00}{\tt \char83\char116\char97\char114\char116\char32} of paragraph
54
54
 
55
- End of \colorbox[rgb]{0.94,0.94,0.88}{\tt \char112\char97\char114\char97\char103\char114\char97\char112\char104\char32}
55
+ End of \colorbox[rgb]{1.00,0.67,1.00}{\tt \char112\char97\char114\char97\char103\char114\char97\char112\char104\char32}
56
+
57
+
58
+ *** Output of to_md ***
59
+ Hello: ! ! ` { } [ ] ( ) # . ! * * *
60
+
61
+ Ora, emphasis, bold, * <- due
62
+ asterischi-> * , un underscore-> _ ,
63
+ emphasis, incre diblee!
64
+
65
+ This is (after)
66
+
67
+ of paragraph
68
+
69
+ End of
56
70
 
57
71
 
58
72
  *** Output of to_s ***
59
- Hello: ! ! ` { } [ ] ( ) # . ! * * *Ora, emphasis, bold, * <- due asterischi-> * , un underscore-> _ , emphasis, incrediblee!This is (after) of paragraphEnd of
60
- *** Output of to_s ***
61
- Hello: ! ! ` { } [ ] ( ) # . ! * * *Ora, emphasis, bold, * <- due asterischi-> * , un underscore-> _ , emphasis, incrediblee!This is (after) of paragraphEnd of
73
+ Hello: ! ! ` { } [ ] ( ) # . ! * * *Ora, emphasis, bold, * <- due asterischi-> * , un underscore-> _ , emphasis, incrediblee!This is (after) of paragraphEnd of
62
74
  *** EOF ***
63
75
 
64
76
 
@@ -81,17 +93,17 @@ End of \colorbox[rgb]{0.94,0.94,0.88}{\tt \char112\char97\char114\char97\char103
81
93
 
82
94
  *** Output of Markdown.pl (parsed) ***
83
95
  <p>Hello: ! ! ` { } [ ] ( ) # . ! * * *</p
84
- ><p>Ora, <em>emphasis</em
85
- >, <strong>bold</strong
86
- >, * &lt;- due asterischi-> * , un underscore-> _ , <em>emphasis</em
87
- >,
96
+ ><p>Ora, <em>emphasis</em
97
+ >, <strong>bold</strong
98
+ >, * &lt;- due asterischi-> * , un underscore-> _ , <em>emphasis</em
99
+ >,
88
100
  incre<em>dible</em
89
- >e!</p
90
- ><p>This is <code>Code with a special: -&gt; ` &lt;-</code
91
- >(after)</p
92
- ><p
93
- ><code>Start</code
94
- > of paragraph</p
95
- ><p>End of <code>paragraph</code
96
- ></p
97
- >
101
+ >e!</p
102
+ ><p>This is <code>Code with a special: -&gt; ` &lt;-</code
103
+ >(after)</p
104
+ ><p
105
+ ><code>Start</code
106
+ > of paragraph</p
107
+ ><p>End of <code>paragraph</code
108
+ ></p
109
+ >
@@ -16,31 +16,21 @@ Orange
16
16
  md_el(:document,[
17
17
  md_el(:definition_list,[
18
18
  md_el(:definition,[
19
- md_el(:definition_term,["Apple"] ),
20
- md_el(:definition_data,[
19
+ md_el(:definition_term,["Apple"],{},[]),
20
+ md_el(:definition_data,[
21
21
  "Pomaceous fruit of plants of the genus Malus in the family Rosaceae."
22
- ] )
23
- ] , {:definitions=>[md_el(:definition_data,[
22
+ ],{},[])
23
+ ],{:definitions=>[md_el(:definition_data,[
24
24
  "Pomaceous fruit of plants of the genus Malus in the family Rosaceae."
25
- ] )], :want_my_paragraph=>false, :terms=>[md_el(:definition_term,["Apple"] )]}),
26
- md_el(:definition,[
27
- md_el(:definition_term,["Orange"] ),
28
- md_el(:definition_data,["The fruit of an evergreen tree of the genus Citrus."] )
29
- ] , {:definitions=>[md_el(:definition_data,["The fruit of an evergreen tree of the genus Citrus."] )], :want_my_paragraph=>false, :terms=>[md_el(:definition_term,["Orange"] )]})
30
- ] )
31
- ] , {:css=>"style.css"})
25
+ ],{},[])],:terms=>[md_el(:definition_term,["Apple"],{},[])],:want_my_paragraph=>false},[]),
26
+ md_el(:definition,[
27
+ md_el(:definition_term,["Orange"],{},[]),
28
+ md_el(:definition_data,["The fruit of an evergreen tree of the genus Citrus."],{},[])
29
+ ],{:definitions=>[md_el(:definition_data,["The fruit of an evergreen tree of the genus Citrus."],{},[])],:terms=>[md_el(:definition_term,["Orange"],{},[])],:want_my_paragraph=>false},[])
30
+ ],{},[])
31
+ ],{},[])
32
32
  *** Output of to_html ***
33
-
34
- <dl>
35
- <dt>Apple</dt>
36
-
37
- <dd>Pomaceous fruit of plants of the genus Malus in the family Rosaceae.</dd>
38
-
39
- <dt>Orange</dt>
40
-
41
- <dd>The fruit of an evergreen tree of the genus Citrus.</dd>
42
- </dl>
43
-
33
+ <dl><dt>Apple</dt><dd>Pomaceous fruit of plants of the genus Malus in the family Rosaceae.</dd><dt>Orange</dt><dd>The fruit of an evergreen tree of the genus Citrus.</dd></dl>
44
34
  *** Output of to_latex ***
45
35
  \begin{description}
46
36
 
@@ -49,7 +39,7 @@ md_el(:document,[
49
39
  \item[Orange] The fruit of an evergreen tree of the genus Citrus.
50
40
  \end{description}
51
41
 
52
- *** Output of to_s ***
42
+ *** Output of to_md ***
53
43
  ApplePomaceous fruit of plants of the genus Malus in the family Rosaceae.OrangeThe fruit of an evergreen tree of the genus Citrus.
54
44
  *** Output of to_s ***
55
45
  ApplePomaceous fruit of plants of the genus Malus in the family Rosaceae.OrangeThe fruit of an evergreen tree of the genus Citrus.
@@ -73,9 +63,9 @@ ApplePomaceous fruit of plants of the genus Malus in the family Rosaceae.OrangeT
73
63
 
74
64
  *** Output of Markdown.pl (parsed) ***
75
65
  <p>CSS: style.css</p
76
- ><p>Apple
77
- : Pomaceous fruit of plants of the genus Malus in
78
- the family Rosaceae.</p
79
- ><p>Orange
80
- : The fruit of an evergreen tree of the genus Citrus.</p
81
- >
66
+ ><p>Apple
67
+ : Pomaceous fruit of plants of the genus Malus in
68
+ the family Rosaceae.</p
69
+ ><p>Orange
70
+ : The fruit of an evergreen tree of the genus Citrus.</p
71
+ >
@@ -18,20 +18,20 @@ Then you can create links to different parts of the same document like this:
18
18
 
19
19
  *** Output of inspect ***
20
20
  md_el(:document,[
21
- md_el(:header,["Header 1"] , {:id=>"header1", :level=>1}),
22
- md_el(:header,["Header 2"] , {:id=>"header2", :level=>2}),
23
- md_el(:header,["Header 3"] , {:id=>"header3", :level=>3}),
24
- md_par([
21
+ md_el(:header,["Header 1"],{:level=>1},[[:id, "header1"]]),
22
+ md_el(:header,["Header 2"],{:level=>2},[[:id, "header2"]]),
23
+ md_el(:header,["Header 3"],{:level=>3},[[:id, "header3"]]),
24
+ md_par([
25
25
  "Then you can create links to different parts of the same document like this:"
26
26
  ]),
27
- md_par([
28
- md_im_link(["Link back to header 1"], "#header1" ),
29
- ", ",
30
- md_im_link(["Link back to header 2"], "#header2" ),
31
- ", ",
32
- md_im_link(["Link back to header 3"], "#header3" )
27
+ md_par([
28
+ md_im_link(["Link back to header 1"], "#header1", nil),
29
+ ", ",
30
+ md_im_link(["Link back to header 2"], "#header2", nil),
31
+ ", ",
32
+ md_im_link(["Link back to header 3"], "#header3", nil)
33
33
  ])
34
- ] , {:title=>"Header 1"})
34
+ ],{},[])
35
35
  *** Output of to_html ***
36
36
 
37
37
  <h1 id='header1'>Header 1</h1>
@@ -53,11 +53,18 @@ md_el(:document,[
53
53
 
54
54
  Then you can create links to different parts of the same document like this:
55
55
 
56
- \hyperlink{header1}{Link back to header 1}, \hyperlink{header2}{Link back to header 2}, \hyperlink{header3}{Link back to header 3}
56
+ , ,
57
+
58
+
59
+ *** Output of to_md ***
60
+ Header 1Header 2Header 3Then you can create links to different
61
+ parts of the same document like this:
62
+
63
+ Link back to header 1,
64
+ Link back to header 2,
65
+ Link back to header 3
57
66
 
58
67
 
59
- *** Output of to_s ***
60
- Header 1Header 2Header 3Then you can create links to different parts of the same document like this:Link back to header 1, Link back to header 2, Link back to header 3
61
68
  *** Output of to_s ***
62
69
  Header 1Header 2Header 3Then you can create links to different parts of the same document like this:Link back to header 1, Link back to header 2, Link back to header 3
63
70
  *** EOF ***
@@ -82,15 +89,15 @@ Header 1Header 2Header 3Then you can create links to different parts of the same
82
89
  <a href="#header3">Link back to header 3</a></p>
83
90
 
84
91
  *** Output of Markdown.pl (parsed) ***
85
- <h1>Header 1 {#header1}</h1
86
- ><h2>Header 2 {#header2}</h2
87
- ><h3>Header 3 ### {#header3}</h3
88
- ><p>Then you can create links to different parts of the same document like this:</p
89
- ><p
90
- ><a href='#header1'>Link back to header 1</a
91
- >,
92
+ <h1>Header 1 {#header1}</h1
93
+ ><h2>Header 2 {#header2}</h2
94
+ ><h3>Header 3 ### {#header3}</h3
95
+ ><p>Then you can create links to different parts of the same document like this:</p
96
+ ><p
97
+ ><a href='#header1'>Link back to header 1</a
98
+ >,
92
99
  <a href='#header2'>Link back to header 2</a
93
- >,
100
+ >,
94
101
  <a href='#header3'>Link back to header 3</a
95
- ></p
96
- >
102
+ ></p
103
+ >