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
@@ -14,12 +14,12 @@ Paragraph
|
|
14
14
|
*** Output of inspect ***
|
15
15
|
md_el(:document,[
|
16
16
|
md_par(["Paragraph"]),
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
]
|
17
|
+
md_ref_def("google1", "#", {:title=>nil}),
|
18
|
+
md_par(["Paragraph"]),
|
19
|
+
md_ref_def("google2", "#", {:title=>nil}),
|
20
|
+
md_par(["Paragraph"]),
|
21
|
+
md_ref_def("google3", "#", {:title=>nil})
|
22
|
+
],{},[])
|
23
23
|
*** Output of to_html ***
|
24
24
|
|
25
25
|
<p>Paragraph</p>
|
@@ -36,8 +36,14 @@ Paragraph
|
|
36
36
|
Paragraph
|
37
37
|
|
38
38
|
|
39
|
-
*** Output of
|
40
|
-
|
39
|
+
*** Output of to_md ***
|
40
|
+
Paragraph
|
41
|
+
|
42
|
+
Paragraph
|
43
|
+
|
44
|
+
Paragraph
|
45
|
+
|
46
|
+
|
41
47
|
*** Output of to_s ***
|
42
48
|
ParagraphParagraphParagraph
|
43
49
|
*** EOF ***
|
@@ -57,4 +63,4 @@ Paragraph</p>
|
|
57
63
|
<p>Paragraph
|
58
64
|
Paragraph
|
59
65
|
Paragraph</p
|
60
|
-
|
66
|
+
>
|
@@ -7,7 +7,7 @@ Paragraph1
|
|
7
7
|
|
8
8
|
Paragraph2
|
9
9
|
*** Output of inspect ***
|
10
|
-
md_el(:document,[md_par(["Paragraph1"]), md_par(["Paragraph2"])]
|
10
|
+
md_el(:document,[md_par(["Paragraph1"]), md_par(["Paragraph2"])],{},[])
|
11
11
|
*** Output of to_html ***
|
12
12
|
|
13
13
|
<p>Paragraph1</p>
|
@@ -20,8 +20,12 @@ Paragraph1
|
|
20
20
|
Paragraph2
|
21
21
|
|
22
22
|
|
23
|
-
*** Output of
|
24
|
-
|
23
|
+
*** Output of to_md ***
|
24
|
+
Paragraph1
|
25
|
+
|
26
|
+
Paragraph2
|
27
|
+
|
28
|
+
|
25
29
|
*** Output of to_s ***
|
26
30
|
Paragraph1Paragraph2
|
27
31
|
*** EOF ***
|
@@ -39,5 +43,5 @@ Paragraph1Paragraph2
|
|
39
43
|
|
40
44
|
*** Output of Markdown.pl (parsed) ***
|
41
45
|
<p>Paragraph1</p
|
42
|
-
|
43
|
-
|
46
|
+
><p>Paragraph2</p
|
47
|
+
>
|
@@ -13,30 +13,23 @@ Paragraph Br->
|
|
13
13
|
Paragraph 5
|
14
14
|
|
15
15
|
|
16
|
-
|
17
|
-
Escaping: & { } [ ] !
|
18
|
-
|
19
16
|
*** Output of inspect ***
|
20
17
|
md_el(:document,[
|
21
18
|
md_par(["Paragraph 1"]),
|
22
|
-
|
23
|
-
|
19
|
+
md_par(["Paragraph 2"]),
|
20
|
+
md_par([
|
24
21
|
"Paragraph 3 Paragraph 4 Paragraph Br->",
|
25
|
-
|
26
|
-
|
27
|
-
])
|
28
|
-
|
29
|
-
] )
|
22
|
+
md_el(:linebreak,[],{},[]),
|
23
|
+
"Paragraph 5"
|
24
|
+
])
|
25
|
+
],{},[])
|
30
26
|
*** Output of to_html ***
|
31
27
|
|
32
28
|
<p>Paragraph 1</p>
|
33
29
|
|
34
30
|
<p>Paragraph 2</p>
|
35
31
|
|
36
|
-
<p>Paragraph 3 Paragraph 4 Paragraph Br-><br />
|
37
|
-
Paragraph 5</p>
|
38
|
-
|
39
|
-
<p>Escaping: & { } ! </p>
|
32
|
+
<p>Paragraph 3 Paragraph 4 Paragraph Br-><br />Paragraph 5</p>
|
40
33
|
|
41
34
|
*** Output of to_latex ***
|
42
35
|
Paragraph 1
|
@@ -45,13 +38,18 @@ Paragraph 2
|
|
45
38
|
|
46
39
|
Paragraph 3 Paragraph 4 Paragraph Br-{\tt \char62}\linebreak Paragraph 5
|
47
40
|
|
48
|
-
|
41
|
+
|
42
|
+
*** Output of to_md ***
|
43
|
+
Paragraph 1
|
44
|
+
|
45
|
+
Paragraph 2
|
46
|
+
|
47
|
+
Paragraph 3 Paragraph 4 Paragraph Br->
|
48
|
+
Paragraph 5
|
49
49
|
|
50
50
|
|
51
51
|
*** Output of to_s ***
|
52
|
-
Paragraph 1Paragraph 2Paragraph 3 Paragraph 4 Paragraph Br->Paragraph
|
53
|
-
*** Output of to_s ***
|
54
|
-
Paragraph 1Paragraph 2Paragraph 3 Paragraph 4 Paragraph Br->Paragraph 5Escaping: & { } !
|
52
|
+
Paragraph 1Paragraph 2Paragraph 3 Paragraph 4 Paragraph Br->Paragraph 5
|
55
53
|
*** EOF ***
|
56
54
|
|
57
55
|
|
@@ -70,15 +68,12 @@ Paragraph 4
|
|
70
68
|
Paragraph Br-> <br />
|
71
69
|
Paragraph 5</p>
|
72
70
|
|
73
|
-
<p>Escaping: & { } [ ] ! </p>
|
74
|
-
|
75
71
|
*** Output of Markdown.pl (parsed) ***
|
76
72
|
<p>Paragraph 1</p
|
77
|
-
|
78
|
-
|
73
|
+
><p>Paragraph 2</p
|
74
|
+
><p>Paragraph 3
|
79
75
|
Paragraph 4
|
80
|
-
Paragraph Br-> <br
|
81
|
-
|
76
|
+
Paragraph Br-> <br
|
77
|
+
/>
|
82
78
|
Paragraph 5</p
|
83
|
-
|
84
|
-
>
|
79
|
+
>
|
@@ -4,18 +4,19 @@ This shows how Maruku recovers from parsing errors
|
|
4
4
|
*** Markdown input: ***
|
5
5
|
Search on [Google images][ GoOgle search ]
|
6
6
|
*** Output of inspect ***
|
7
|
-
md_el(:document,[md_par(["Search on Google imagesGoOgle search ]"])]
|
7
|
+
md_el(:document,[md_par(["Search on Google imagesGoOgle search ]"])],{},[])
|
8
8
|
*** Output of to_html ***
|
9
|
-
|
10
|
-
|
9
|
+
|
10
|
+
<p>Search on Google imagesGoOgle search ]</p>
|
11
|
+
|
11
12
|
*** Output of to_latex ***
|
12
13
|
Search on Google imagesGoOgle search ]
|
13
14
|
|
14
15
|
|
15
|
-
*** Output of to_s ***
|
16
|
-
Search on Google imagesGoOgle search ]
|
17
16
|
*** Output of to_md ***
|
18
17
|
Search on Google imagesGoOgle search ]
|
18
|
+
*** Output of to_s ***
|
19
|
+
Search on Google imagesGoOgle search ]
|
19
20
|
*** EOF ***
|
20
21
|
|
21
22
|
|
@@ -19,29 +19,29 @@ To this end, Markdown's syntax is comprised entirely of punctuation
|
|
19
19
|
md_el(:document,[
|
20
20
|
md_par([
|
21
21
|
"filters -- including ",
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
22
|
+
md_link(["Setext"],"1"),
|
23
|
+
", ",
|
24
|
+
md_link(["atx"],"2"),
|
25
|
+
", ",
|
26
|
+
md_link(["Textile"],"3"),
|
27
|
+
", ",
|
28
|
+
md_link(["reStructuredText"],"4"),
|
29
|
+
", ",
|
30
|
+
md_link(["Grutatext"],"5"),
|
31
|
+
", and ",
|
32
|
+
md_link(["EtText"],"6"),
|
33
|
+
" -- the single biggest source of inspiration for Markdown's syntax is the format of plain text email."
|
34
34
|
]),
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
35
|
+
md_ref_def("1", "http://docutils.sourceforge.net/mirror/setext.html", {:title=>nil}),
|
36
|
+
md_ref_def("2", "http://www.aaronsw.com/2002/atx/", {:title=>nil}),
|
37
|
+
md_ref_def("3", "http://textism.com/tools/textile/", {:title=>nil}),
|
38
|
+
md_ref_def("4", "http://docutils.sourceforge.net/rst.html", {:title=>nil}),
|
39
|
+
md_ref_def("5", "http://www.triptico.com/software/grutatxt.html", {:title=>nil}),
|
40
|
+
md_ref_def("6", "http://ettext.taint.org/doc/", {:title=>nil}),
|
41
|
+
md_par([
|
42
42
|
"To this end, Markdown's syntax is comprised entirely of punctuation"
|
43
43
|
])
|
44
|
-
]
|
44
|
+
],{},[])
|
45
45
|
*** Output of to_html ***
|
46
46
|
|
47
47
|
<p>filters -- including <a href='http://docutils.sourceforge.net/mirror/setext.html'>Setext</a>, <a href='http://www.aaronsw.com/2002/atx/'>atx</a>, <a href='http://textism.com/tools/textile/'>Textile</a>, <a href='http://docutils.sourceforge.net/rst.html'>reStructuredText</a>, <a href='http://www.triptico.com/software/grutatxt.html'>Grutatext</a>, and <a href='http://ettext.taint.org/doc/'>EtText</a> -- the single biggest source of inspiration for Markdown's syntax is the format of plain text email.</p>
|
@@ -54,8 +54,17 @@ filters -- including \href{http://docutils.sourceforge.net/mirror/setext.html}{S
|
|
54
54
|
To this end, Markdown's syntax is comprised entirely of punctuation
|
55
55
|
|
56
56
|
|
57
|
-
*** Output of
|
58
|
-
filters -- including Setext, atx,
|
57
|
+
*** Output of to_md ***
|
58
|
+
filters -- including Setext, atx,
|
59
|
+
Textile, reStructuredText, Grutatext,
|
60
|
+
and EtText-- the single biggest source
|
61
|
+
of inspiration for Markdown's syntax is
|
62
|
+
the format of plain text email.
|
63
|
+
|
64
|
+
To this end, Markdown's syntax is
|
65
|
+
comprised entirely of punctuation
|
66
|
+
|
67
|
+
|
59
68
|
*** Output of to_s ***
|
60
69
|
filters -- including Setext, atx, Textile, reStructuredText, Grutatext, and EtText -- the single biggest source of inspiration for Markdown's syntax is the format of plain text email.To this end, Markdown's syntax is comprised entirely of punctuation
|
61
70
|
*** EOF ***
|
@@ -75,13 +84,13 @@ inspiration for Markdown's syntax is the format of plain text email.</p>
|
|
75
84
|
|
76
85
|
*** Output of Markdown.pl (parsed) ***
|
77
86
|
<p>filters -- including <a href='http://docutils.sourceforge.net/mirror/setext.html'>Setext</a
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
87
|
+
>, <a href='http://www.aaronsw.com/2002/atx/'>atx</a
|
88
|
+
>, <a href='http://textism.com/tools/textile/'>Textile</a
|
89
|
+
>, <a href='http://docutils.sourceforge.net/rst.html'>reStructuredText</a
|
90
|
+
>,
|
82
91
|
<a href='http://www.triptico.com/software/grutatxt.html'>Grutatext</a
|
83
|
-
|
84
|
-
|
92
|
+
>, and <a href='http://ettext.taint.org/doc/'>EtText</a
|
93
|
+
> -- the single biggest source of
|
85
94
|
inspiration for Markdown's syntax is the format of plain text email.</p
|
86
|
-
|
87
|
-
|
95
|
+
><p>To this end, Markdown's syntax is comprised entirely of punctuation</p
|
96
|
+
>
|
@@ -4,12 +4,12 @@ Spaces can be put before. ID can be a number
|
|
4
4
|
*** Markdown input: ***
|
5
5
|
[6]: http://ettext.taint.org/doc/
|
6
6
|
*** Output of inspect ***
|
7
|
-
md_el(:document,[md_ref_def("6", "http://ettext.taint.org/doc/"
|
7
|
+
md_el(:document,[md_ref_def("6", "http://ettext.taint.org/doc/", {:title=>nil})],{},[])
|
8
8
|
*** Output of to_html ***
|
9
9
|
|
10
10
|
*** Output of to_latex ***
|
11
11
|
|
12
|
-
*** Output of
|
12
|
+
*** Output of to_md ***
|
13
13
|
|
14
14
|
*** Output of to_s ***
|
15
15
|
|
data/tests/unittest/syntax_hl.md
CHANGED
@@ -10,33 +10,29 @@ This is ruby code:
|
|
10
10
|
|
11
11
|
This is ruby code:
|
12
12
|
|
13
|
-
|
13
|
+
|
14
14
|
|
15
15
|
require 'maruku'
|
16
|
+
{lang=ruby html_use_syntax}
|
16
17
|
|
17
18
|
puts Maruku.new($stdin).to_html
|
18
19
|
*** Output of inspect ***
|
19
20
|
md_el(:document,[
|
20
21
|
md_par(["This is ruby code:"]),
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
] )
|
22
|
+
md_el(:code,[],{:raw_code=>"require 'maruku'\n\nputs Maruku.new($stdin).to_html\n"},[]),
|
23
|
+
md_par(["This is ruby code:"]),
|
24
|
+
md_el(:code,[],{:raw_code=>"require 'maruku'"},[["lang", "ruby"], [:ref, "html_use_syntax"]]),
|
25
|
+
md_el(:code,[],{:raw_code=>"puts Maruku.new($stdin).to_html"},[])
|
26
|
+
],{},[])
|
25
27
|
*** Output of to_html ***
|
26
28
|
|
27
29
|
<p>This is ruby code:</p>
|
28
|
-
|
29
30
|
<pre><code>require 'maruku'
|
30
31
|
|
31
32
|
puts Maruku.new($stdin).to_html
|
32
33
|
</code></pre>
|
33
|
-
|
34
34
|
<p>This is ruby code:</p>
|
35
|
-
|
36
|
-
<pre class='ruby'><span class='ident'>require</span> <span class='punct'>'</span><span class='string'>maruku</span><span class='punct'>'</span>
|
37
|
-
|
38
|
-
<span class='ident'>puts</span> <span class='constant'>Maruku</span><span class='punct'>.</span><span class='ident'>new</span><span class='punct'>(</span><span class='global'>$stdin</span><span class='punct'>).</span><span class='ident'>to_html</span></pre>
|
39
|
-
|
35
|
+
<pre class='ruby'><span class='ident'>require</span> <span class='punct'>'</span><span class='string'>maruku</span><span class='punct'>'</span></pre><pre><code>puts Maruku.new($stdin).to_html</code></pre>
|
40
36
|
*** Output of to_latex ***
|
41
37
|
This is ruby code:
|
42
38
|
|
@@ -46,12 +42,15 @@ puts Maruku.new($stdin).to_html
|
|
46
42
|
\end{verbatim}
|
47
43
|
This is ruby code:
|
48
44
|
|
49
|
-
\begin{verbatim}require 'maruku'
|
45
|
+
\begin{verbatim}require 'maruku'\end{verbatim}
|
46
|
+
\begin{verbatim}puts Maruku.new($stdin).to_html\end{verbatim}
|
47
|
+
|
48
|
+
*** Output of to_md ***
|
49
|
+
This is ruby code:
|
50
|
+
|
51
|
+
This is ruby code:
|
50
52
|
|
51
|
-
puts Maruku.new($stdin).to_html\end{verbatim}
|
52
53
|
|
53
|
-
*** Output of to_s ***
|
54
|
-
This is ruby code:This is ruby code:
|
55
54
|
*** Output of to_s ***
|
56
55
|
This is ruby code:This is ruby code:
|
57
56
|
*** EOF ***
|
@@ -72,28 +71,31 @@ puts Maruku.new($stdin).to_html
|
|
72
71
|
|
73
72
|
<p>This is ruby code:</p>
|
74
73
|
|
75
|
-
<p>@ lang: ruby; html<em>use</em>syntax</p>
|
76
|
-
|
77
74
|
<pre><code>require 'maruku'
|
75
|
+
</code></pre>
|
78
76
|
|
79
|
-
|
77
|
+
<p>{lang=ruby html<em>use</em>syntax}</p>
|
78
|
+
|
79
|
+
<pre><code>puts Maruku.new($stdin).to_html
|
80
80
|
</code></pre>
|
81
81
|
|
82
82
|
*** Output of Markdown.pl (parsed) ***
|
83
83
|
<p>This is ruby code:</p
|
84
|
-
|
85
|
-
|
84
|
+
><pre
|
85
|
+
><code>require 'maruku'
|
86
86
|
|
87
87
|
puts Maruku.new($stdin).to_html
|
88
88
|
</code
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
89
|
+
></pre
|
90
|
+
><p>This is ruby code:</p
|
91
|
+
><pre
|
92
|
+
><code>require 'maruku'
|
93
|
+
</code
|
94
|
+
></pre
|
95
|
+
><p>{lang=ruby html<em>use</em
|
96
|
+
>syntax}</p
|
97
|
+
><pre
|
98
|
+
><code>puts Maruku.new($stdin).to_html
|
97
99
|
</code
|
98
|
-
|
99
|
-
|
100
|
+
></pre
|
101
|
+
>
|
data/tests/unittest/test.md
CHANGED
@@ -8,15 +8,13 @@ Write a comment abouth the test here.
|
|
8
8
|
|
9
9
|
|
10
10
|
*** Output of inspect ***
|
11
|
-
md_el(:document,[md_el(:code,[]
|
11
|
+
md_el(:document,[md_el(:code,[],{:raw_code=>" $ python "},[])],{},[])
|
12
12
|
*** Output of to_html ***
|
13
|
-
|
14
13
|
<pre><code> $ python </code></pre>
|
15
|
-
|
16
14
|
*** Output of to_latex ***
|
17
15
|
\begin{verbatim} $ python \end{verbatim}
|
18
16
|
|
19
|
-
*** Output of
|
17
|
+
*** Output of to_md ***
|
20
18
|
|
21
19
|
*** Output of to_s ***
|
22
20
|
|
@@ -32,5 +30,5 @@ md_el(:document,[md_el(:code,[] , {:raw_code=>" $ python "})] )
|
|
32
30
|
<p>$ python </p>
|
33
31
|
|
34
32
|
*** Output of Markdown.pl (parsed) ***
|
35
|
-
<p>$ python
|
36
|
-
|
33
|
+
<p>$ python </p
|
34
|
+
>
|
data/tests/unittest/wrapping.md
CHANGED
@@ -14,34 +14,32 @@ Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ip
|
|
14
14
|
md_el(:document,[
|
15
15
|
md_par([
|
16
16
|
"Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Break:",
|
17
|
-
|
18
|
-
|
17
|
+
md_el(:linebreak,[],{},[]),
|
18
|
+
"Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet."
|
19
19
|
]),
|
20
|
-
|
20
|
+
md_el(:ul,[
|
21
21
|
md_el(:li_span,[
|
22
22
|
"Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet Lorem ipsum Break:",
|
23
|
-
|
24
|
-
|
25
|
-
]
|
26
|
-
|
23
|
+
md_el(:linebreak,[],{},[]),
|
24
|
+
"Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet"
|
25
|
+
],{:want_my_paragraph=>false},[]),
|
26
|
+
md_el(:li_span,[
|
27
27
|
"Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet"
|
28
|
-
]
|
29
|
-
]
|
30
|
-
]
|
28
|
+
],{:want_my_paragraph=>false},[])
|
29
|
+
],{},[])
|
30
|
+
],{},[])
|
31
31
|
*** Output of to_html ***
|
32
32
|
|
33
|
-
<p>Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Break:<br />
|
34
|
-
Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. </p>
|
33
|
+
<p>Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Break:<br />Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet.</p>
|
35
34
|
|
36
35
|
<ul>
|
37
|
-
<li>Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet Lorem ipsum Break:<br />
|
38
|
-
Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet</li>
|
36
|
+
<li>Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet Lorem ipsum Break:<br />Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet</li>
|
39
37
|
|
40
38
|
<li>Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet</li>
|
41
39
|
</ul>
|
42
40
|
|
43
41
|
*** Output of to_latex ***
|
44
|
-
Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Break:\linebreak Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet.
|
42
|
+
Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Break:\linebreak Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet.
|
45
43
|
|
46
44
|
\begin{itemize}%
|
47
45
|
\item Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet Lorem ipsum Break:\linebreak Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet
|
@@ -49,10 +47,29 @@ Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ip
|
|
49
47
|
|
50
48
|
\end{itemize}
|
51
49
|
|
50
|
+
*** Output of to_md ***
|
51
|
+
Lorem ipsum dolor amet. Lorem ipsum
|
52
|
+
dolor amet. Lorem ipsum dolor amet.
|
53
|
+
Lorem ipsum dolor amet. Lorem ipsum
|
54
|
+
dolor amet. Lorem ipsum dolor amet.
|
55
|
+
Lorem ipsum dolor amet. Break:
|
56
|
+
Lorem ipsum dolor amet. Lorem ipsum
|
57
|
+
dolor amet. Lorem ipsum dolor amet.
|
58
|
+
Lorem ipsum dolor amet.
|
59
|
+
|
60
|
+
-orem ipsum dolor amet. Lorem ipsum
|
61
|
+
dolor amet. Lorem ipsum dolor amet.
|
62
|
+
Lorem ipsum dolor amet Lorem ipsum
|
63
|
+
Break:
|
64
|
+
Lorem ipsum dolor amet. Lorem ipsum
|
65
|
+
dolor amet. Lorem ipsum dolor amet
|
66
|
+
-orem ipsum dolor amet. Lorem ipsum
|
67
|
+
dolor amet. Lorem ipsum dolor amet.
|
68
|
+
Lorem ipsum dolor amet
|
69
|
+
|
70
|
+
|
52
71
|
*** Output of to_s ***
|
53
|
-
Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Break:Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet.
|
54
|
-
*** Output of to_s ***
|
55
|
-
Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Break:Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet Lorem ipsum Break:Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor ametLorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet
|
72
|
+
Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Break:Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet.Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet Lorem ipsum Break:Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor ametLorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet
|
56
73
|
*** EOF ***
|
57
74
|
|
58
75
|
|
@@ -73,16 +90,16 @@ Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet</li>
|
|
73
90
|
</ul>
|
74
91
|
|
75
92
|
*** Output of Markdown.pl (parsed) ***
|
76
|
-
<p>Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Break: <br
|
77
|
-
|
93
|
+
<p>Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Break: <br
|
94
|
+
/>
|
78
95
|
Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. </p
|
79
|
-
|
96
|
+
><ul>
|
80
97
|
<li>Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet
|
81
|
-
Lorem ipsum Break: <br
|
82
|
-
|
98
|
+
Lorem ipsum Break: <br
|
99
|
+
/>
|
83
100
|
Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet</li
|
84
|
-
|
101
|
+
>
|
85
102
|
<li>Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet. Lorem ipsum dolor amet</li
|
86
|
-
|
103
|
+
>
|
87
104
|
</ul
|
88
|
-
|
105
|
+
>
|