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
@@ -1,9 +1,46 @@
|
|
1
1
|
Encoding: iso-8859-1
|
2
2
|
|
3
|
-
***
|
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"])]
|
10
|
+
md_el(:document,[md_par(["Japanese: \343\203\236\343\203\253\343\202\257"])],{},[])
|
11
11
|
*** Output of to_html ***
|
12
|
-
|
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
|
|
data/tests/unittest/entities.md
CHANGED
@@ -25,74 +25,36 @@ It should read just like this: `©`.
|
|
25
25
|
*** Output of inspect ***
|
26
26
|
md_el(:document,[
|
27
27
|
md_par(["Maruku translates HTML entities to the equivalent in LaTeX:"]),
|
28
|
-
|
29
|
-
md_el(:head_cell,["Entity"]
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
]
|
42
|
-
|
28
|
+
md_el(:table,[
|
29
|
+
md_el(:head_cell,["Entity"],{},[]),
|
30
|
+
md_el(:head_cell,["Result"],{},[]),
|
31
|
+
md_el(:cell,[md_code("©")],{},[]),
|
32
|
+
md_el(:cell,[md_entity("copy")],{},[]),
|
33
|
+
md_el(:cell,[md_code("£")],{},[]),
|
34
|
+
md_el(:cell,[md_entity("pound")],{},[]),
|
35
|
+
md_el(:cell,[md_code("a b")],{},[]),
|
36
|
+
md_el(:cell,["a", md_entity("nbsp"), "b"],{},[]),
|
37
|
+
md_el(:cell,[md_code("λ")],{},[]),
|
38
|
+
md_el(:cell,[md_entity("lambda")],{},[]),
|
39
|
+
md_el(:cell,[md_code("—")],{},[]),
|
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
|
-
|
46
|
-
|
47
|
-
|
48
|
-
]
|
45
|
+
md_par(["The following should not be translated:"]),
|
46
|
+
md_el(:code,[],{:raw_code=>"©\n"},[]),
|
47
|
+
md_par(["It should read just like this: ", md_code("©"), "."])
|
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>&copy;</code></td>
|
60
|
-
|
61
|
-
<td style='text-align: left;'>©</td>
|
62
|
-
</tr>
|
63
|
-
|
64
|
-
<tr>
|
65
|
-
<td style='text-align: left;'><code>&pound;</code></td>
|
66
|
-
|
67
|
-
<td style='text-align: left;'>£</td>
|
68
|
-
</tr>
|
69
|
-
|
70
|
-
<tr>
|
71
|
-
<td style='text-align: left;'><code>a&nbsp;b</code></td>
|
72
|
-
|
73
|
-
<td style='text-align: left;'>a b</td>
|
74
|
-
</tr>
|
75
|
-
|
76
|
-
<tr>
|
77
|
-
<td style='text-align: left;'><code>&lambda;</code></td>
|
78
|
-
|
79
|
-
<td style='text-align: left;'>λ</td>
|
80
|
-
</tr>
|
81
|
-
|
82
|
-
<tr>
|
83
|
-
<td style='text-align: left;'><code>&mdash;</code></td>
|
84
|
-
|
85
|
-
<td style='text-align: left;'>—</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>&copy;</code></td><td style='text-align: left;'>©</td></tr><tr><td style='text-align: left;'><code>&pound;</code></td><td style='text-align: left;'>£</td></tr><tr><td style='text-align: left;'><code>a&nbsp;b</code></td><td style='text-align: left;'>a b</td></tr><tr><td style='text-align: left;'><code>&lambda;</code></td><td style='text-align: left;'>λ</td></tr><tr><td style='text-align: left;'><code>&mdash;</code></td><td style='text-align: left;'>—</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>&copy;
|
94
57
|
</code></pre>
|
95
|
-
|
96
58
|
<p>It should read just like this: <code>&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]{
|
105
|
-
\colorbox[rgb]{
|
106
|
-
\colorbox[rgb]{
|
107
|
-
\colorbox[rgb]{
|
108
|
-
\colorbox[rgb]{
|
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}©
|
116
78
|
\end{verbatim}
|
117
|
-
It should read just like this: \colorbox[rgb]{
|
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
|
-
|
126
|
+
><p>Entity | Result
|
155
127
|
------------|----------
|
156
128
|
<code>&copy;</code
|
157
|
-
|
129
|
+
> | ©
|
158
130
|
<code>&pound;</code
|
159
|
-
|
131
|
+
> | £
|
160
132
|
<code>a&nbsp;b</code
|
161
|
-
|
133
|
+
> | a b
|
162
134
|
<code>&lambda;</code
|
163
|
-
|
135
|
+
> | λ
|
164
136
|
<code>&mdash;</code
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
137
|
+
> | —</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>&copy;
|
170
142
|
</code
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
143
|
+
></pre
|
144
|
+
><p>It should read just like this: <code>&copy;</code
|
145
|
+
>.</p
|
146
|
+
>
|
data/tests/unittest/escaping.md
CHANGED
@@ -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(["
|
19
|
-
|
18
|
+
md_par(["Hello: ! ! ` { } [ ] ( ) # . ! * * *"]),
|
19
|
+
md_par([
|
20
20
|
"Ora, ",
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
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
|
-
|
31
|
-
|
32
|
-
|
33
|
-
]
|
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>
|
36
|
+
<p>Hello: ! ! ` { } [ ] ( ) # . ! * * *</p>
|
37
37
|
|
38
38
|
<p>Ora, <em>emphasis</em>, <strong>bold</strong>, * <- due asterischi-> * , un underscore-> _ , <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
|
-
|
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]{
|
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]{
|
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]{
|
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
|
-
|
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
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
96
|
+
><p>Ora, <em>emphasis</em
|
97
|
+
>, <strong>bold</strong
|
98
|
+
>, * <- due asterischi-> * , un underscore-> _ , <em>emphasis</em
|
99
|
+
>,
|
88
100
|
incre<em>dible</em
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
101
|
+
>e!</p
|
102
|
+
><p>This is <code>Code with a special: -> ` <-</code
|
103
|
+
>(after)</p
|
104
|
+
><p
|
105
|
+
><code>Start</code
|
106
|
+
> of paragraph</p
|
107
|
+
><p>End of <code>paragraph</code
|
108
|
+
></p
|
109
|
+
>
|
data/tests/unittest/extra_dl.md
CHANGED
@@ -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
|
-
|
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
|
-
]
|
22
|
+
],{},[])
|
23
|
+
],{:definitions=>[md_el(:definition_data,[
|
24
24
|
"Pomaceous fruit of plants of the genus Malus in the family Rosaceae."
|
25
|
-
]
|
26
|
-
|
27
|
-
md_el(:definition_term,["Orange"]
|
28
|
-
|
29
|
-
]
|
30
|
-
]
|
31
|
-
]
|
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
|
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
|
-
|
77
|
-
:
|
78
|
-
|
79
|
-
|
80
|
-
:
|
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"]
|
22
|
-
|
23
|
-
|
24
|
-
|
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
|
-
|
28
|
-
md_im_link(["Link back to header 1"], "#header1" ),
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
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
|
-
]
|
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
|
-
|
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
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
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
|
-
|
96
|
-
|
102
|
+
></p
|
103
|
+
>
|