maruku 0.4.2.1 → 0.5.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.
- data/bin/maruku +66 -20
- data/bin/marutest +12 -2
- data/docs/changelog.html +188 -23
- data/docs/changelog.md +128 -5
- data/docs/entity_test.html +245 -240
- data/docs/entity_test.md +2 -0
- data/docs/exd.html +181 -23
- data/docs/index.html +130 -349
- data/docs/markdown_syntax.html +55 -51
- data/docs/maruku.html +130 -349
- data/docs/maruku.md +154 -339
- data/docs/math.md +143 -0
- data/docs/proposal.html +16 -12
- data/lib/maruku.rb +6 -3
- data/lib/maruku/attributes.rb +7 -2
- data/lib/maruku/defaults.rb +27 -27
- data/lib/maruku/errors_management.rb +10 -9
- data/lib/maruku/ext/diagrams/diagrams.rb +8 -0
- data/lib/maruku/ext/diagrams/grid.rb +78 -0
- data/lib/maruku/ext/diagrams/inspect.rb +11 -0
- data/lib/maruku/ext/diagrams/layout.rb +105 -0
- data/lib/maruku/ext/diagrams/parser.rb +219 -0
- data/lib/maruku/ext/diagrams/structures.rb +168 -0
- data/lib/maruku/ext/diagrams/to_html.rb +37 -0
- data/lib/maruku/ext/diagrams/to_latex.rb +308 -0
- data/lib/maruku/ext/diagrams/unittest.rb +123 -0
- data/lib/maruku/ext/math.rb +11 -0
- data/lib/maruku/ext/math/elements.rb +26 -0
- data/lib/maruku/ext/math/mathml_engines/blahtex.rb +108 -0
- data/lib/maruku/ext/math/mathml_engines/itex2mml.rb +29 -0
- data/lib/maruku/ext/math/mathml_engines/none.rb +20 -0
- data/lib/maruku/ext/math/mathml_engines/ritex.rb +24 -0
- data/lib/maruku/ext/math/parsing.rb +82 -0
- data/lib/maruku/ext/math/to_html.rb +178 -0
- data/lib/maruku/ext/math/to_latex.rb +21 -0
- data/lib/maruku/helpers.rb +11 -0
- data/lib/maruku/input/charsource.rb +1 -1
- data/lib/maruku/input/extensions.rb +68 -0
- data/lib/maruku/input/html_helper.rb +91 -60
- data/lib/maruku/input/parse_block.rb +10 -9
- data/lib/maruku/input/parse_doc.rb +21 -13
- data/lib/maruku/input/parse_span_better.rb +19 -8
- data/lib/maruku/input/type_detection.rb +5 -3
- data/lib/maruku/output/to_html.rb +236 -67
- data/lib/maruku/output/to_latex.rb +69 -26
- data/lib/maruku/output/to_latex_entities.rb +14 -2
- data/lib/maruku/output/to_s.rb +8 -0
- data/lib/maruku/structures.rb +1 -1
- data/lib/maruku/tests/benchmark.rb +2 -2
- data/lib/maruku/tests/new_parser.rb +13 -5
- data/lib/maruku/version.rb +1 -1
- data/lib/sort_prof.rb +22 -0
- data/tests/diagrams/diagrams.md +54 -0
- data/tests/math/syntax.md +46 -0
- data/tests/math_usage/document.md +13 -0
- data/tests/unittest/attributes/attributes.md +50 -6
- data/tests/unittest/easy.md +1 -1
- data/tests/unittest/email.md +3 -3
- data/tests/unittest/entities.md +12 -7
- data/tests/unittest/escaping.md +4 -4
- data/tests/unittest/extra_table1.md +3 -1
- data/tests/unittest/footnotes.md +5 -5
- data/tests/unittest/headers.md +3 -3
- data/tests/unittest/images.md +7 -7
- data/tests/unittest/inline_html.md +51 -5
- data/tests/unittest/links.md +7 -7
- data/tests/unittest/list2.md +1 -1
- data/tests/unittest/lists.md +1 -1
- data/tests/unittest/lists_after_paragraph.md +1 -1
- data/tests/unittest/lists_ol.md +1 -1
- data/tests/unittest/math/equations.md +82 -0
- data/tests/unittest/math/inline.md +80 -0
- data/tests/unittest/math/table.md +51 -0
- data/tests/unittest/math/table2.md +67 -0
- data/tests/unittest/misc_sw.md +24 -24
- data/tests/unittest/notyet/ticks.md +1 -1
- data/tests/unittest/references/long_example.md +2 -2
- data/tests/unittest/smartypants.md +4 -4
- data/tests/unittest/xml.md +68 -0
- data/tests/unittest/xml2.md +36 -0
- data/tests/unittest/xml3.md +52 -0
- data/tests/unittest/xml_instruction.md +5 -5
- metadata +33 -4
- data/docs/a.html +0 -6
- data/docs/char.html +0 -1924
@@ -0,0 +1,13 @@
|
|
1
|
+
css: math.css
|
2
|
+
|
3
|
+
This is an example document. Inline: $a$, $b$, $q$ and stop.
|
4
|
+
|
5
|
+
$$ \int_a^b f(x) dx $$ (1)
|
6
|
+
|
7
|
+
See for example (eq:1).
|
8
|
+
|
9
|
+
Equation inline: $ \int_a^b f(x) dx $ and that's it.
|
10
|
+
|
11
|
+
|
12
|
+
Spacing: Maruku outputs sizes and alignment for images in `ex`. An `ex` is one `x`:
|
13
|
+
x, $\textrm{x}$, $x$ should have the same height.
|
@@ -13,7 +13,7 @@ Header with attributes {#header1}
|
|
13
13
|
{:warn2}Paragraph with a.
|
14
14
|
{#par1}
|
15
15
|
|
16
|
-
Paragraph with *emphasis*{hello notfound}
|
16
|
+
Paragraph with *emphasis*{:hello notfound}
|
17
17
|
{#par2}
|
18
18
|
|
19
19
|
{:hello: .chello}
|
@@ -22,7 +22,7 @@ md_el(:document,[
|
|
22
22
|
md_el(:header,["Header with attributes"],{:level=>2},[[:id, "header1"]]),
|
23
23
|
md_el(:header,["Header with attributes"],{:level=>3},[[:id, "header2"]]),
|
24
24
|
md_el(:header,["Header no attributes"],{:level=>3},[]),
|
25
|
-
md_par(["Paragraph with a."], [[:id, "par1"]]),
|
25
|
+
md_par(["Paragraph with a."], [[:id, "par1"], [:ref, "warn2"]]),
|
26
26
|
md_par(["Paragraph with ", md_em(["emphasis"])], [[:id, "par2"]]),
|
27
27
|
md_el(:ald,[],{:ald=>[[:class, "chello"]],:ald_id=>"o"},[])
|
28
28
|
],{},[])
|
@@ -47,7 +47,7 @@ md_el(:document,[
|
|
47
47
|
|
48
48
|
Paragraph with a.
|
49
49
|
|
50
|
-
Paragraph with {
|
50
|
+
Paragraph with \emph{emphasis}
|
51
51
|
|
52
52
|
|
53
53
|
*** Output of to_md ***
|
@@ -62,10 +62,54 @@ Header with attributesHeader with attributesHeader no attributesParagraph with a
|
|
62
62
|
|
63
63
|
|
64
64
|
|
65
|
-
OK!
|
66
65
|
|
66
|
+
Failed tests: [:inspect]
|
67
|
+
|
68
|
+
*** Output of inspect ***
|
69
|
+
-----| WARNING | -----
|
70
|
+
md_el(:document,[
|
71
|
+
md_el(:header,["Header with attributes"],{:level=>2},[[:id, "header1"]]),
|
72
|
+
md_el(:header,["Header with attributes"],{:level=>3},[[:id, "header2"]]),
|
73
|
+
md_el(:header,["Header no attributes"],{:level=>3},[]),
|
74
|
+
md_par(["Paragraph with a."], [[:id, "par1"]]),
|
75
|
+
md_par([
|
76
|
+
"Paragraph with ",
|
77
|
+
md_em(["emphasis"], [[:ref, "hello notfound"], [:ref, "notfound"]])
|
78
|
+
], [[:id, "par2"]]),
|
79
|
+
md_el(:ald,[],{:ald=>[[:class, "chello"]],:ald_id=>"o"},[])
|
80
|
+
],{},[])
|
81
|
+
*** Output of to_html ***
|
82
|
+
|
83
|
+
<h2 id='header1'>Header with attributes</h2>
|
84
|
+
|
85
|
+
<h3 id='header2'>Header with attributes</h3>
|
86
|
+
|
87
|
+
<h3 id='header_no_attributes'>Header no attributes</h3>
|
88
|
+
|
89
|
+
<p id='par1'>Paragraph with a.</p>
|
67
90
|
|
91
|
+
<p id='par2'>Paragraph with <em>emphasis</em></p>
|
68
92
|
|
93
|
+
*** Output of to_latex ***
|
94
|
+
\hypertarget{header1}{}\subsection*{{Header with attributes}}\label{header1}
|
95
|
+
|
96
|
+
\hypertarget{header2}{}\subsubsection*{{Header with attributes}}\label{header2}
|
97
|
+
|
98
|
+
\hypertarget{header_no_attributes}{}\subsubsection*{{Header no attributes}}\label{header_no_attributes}
|
99
|
+
|
100
|
+
Paragraph with a.
|
101
|
+
|
102
|
+
Paragraph with \emph{emphasis}
|
103
|
+
|
104
|
+
|
105
|
+
*** Output of to_md ***
|
106
|
+
Header with attributesHeader with attributesHeader no attributesParagraph with a.
|
107
|
+
|
108
|
+
Paragraph with emphasis
|
109
|
+
|
110
|
+
|
111
|
+
*** Output of to_s ***
|
112
|
+
Header with attributesHeader with attributesHeader no attributesParagraph with a.Paragraph with emphasis
|
69
113
|
*** Output of Markdown.pl ***
|
70
114
|
<h2>Header with attributes {#header1} </h2>
|
71
115
|
|
@@ -76,7 +120,7 @@ Header with attributesHeader with attributesHeader no attributesParagraph with a
|
|
76
120
|
<p>{:warn2}Paragraph with a.
|
77
121
|
{#par1}</p>
|
78
122
|
|
79
|
-
<p>Paragraph with <em>emphasis</em>{hello notfound}
|
123
|
+
<p>Paragraph with <em>emphasis</em>{:hello notfound}
|
80
124
|
{#par2}</p>
|
81
125
|
|
82
126
|
<p>{:hello: .chello}</p>
|
@@ -88,7 +132,7 @@ Header with attributesHeader with attributesHeader no attributesParagraph with a
|
|
88
132
|
><p>{:warn2}Paragraph with a.
|
89
133
|
{#par1}</p
|
90
134
|
><p>Paragraph with <em>emphasis</em
|
91
|
-
>{hello notfound}
|
135
|
+
>{:hello notfound}
|
92
136
|
{#par2}</p
|
93
137
|
><p>{:hello: .chello}</p
|
94
138
|
>
|
data/tests/unittest/easy.md
CHANGED
@@ -10,7 +10,7 @@ md_el(:document,[md_par([md_em(["Hello!"]), " how are ", md_strong(["you"]), "?"
|
|
10
10
|
<p><em>Hello!</em> how are <strong>you</strong>?</p>
|
11
11
|
|
12
12
|
*** Output of to_latex ***
|
13
|
-
{
|
13
|
+
\emph{Hello!} how are \textbf{you}?
|
14
14
|
|
15
15
|
|
16
16
|
*** Output of to_md ***
|
data/tests/unittest/email.md
CHANGED
@@ -15,7 +15,7 @@ md_el(:document,[
|
|
15
15
|
<p>This is an email address: <a href='mailto:andrea@invalid.it'>andrea@invalid.it</a></p>
|
16
16
|
|
17
17
|
*** Output of to_latex ***
|
18
|
-
This is an email address: \href{mailto:andrea@invalid.it}{\
|
18
|
+
This is an email address: \href{mailto:andrea@invalid.it}{andrea\char64invalid\char46it}
|
19
19
|
|
20
20
|
|
21
21
|
*** Output of to_md ***
|
@@ -33,9 +33,9 @@ This is an email address:
|
|
33
33
|
|
34
34
|
|
35
35
|
*** Output of Markdown.pl ***
|
36
|
-
<p>This is an email address: <a href="
|
36
|
+
<p>This is an email address: <a href="mailto:andrea@invalid.it">andrea@invalid.it</a></p>
|
37
37
|
|
38
38
|
*** Output of Markdown.pl (parsed) ***
|
39
|
-
<p>This is an email address: <a href='
|
39
|
+
<p>This is an email address: <a href='&#x6D;&#x61;&#x69;&#108;t&#x6F;:&#97;&#x6E;&#100;&#114;&#x65;&#97;&#64;&#105;&#x6E;&#x76;&#x61;&#x6C;&#x69;&#x64;.&#x69;&#116;'>andrea@invalid.it</a
|
40
40
|
></p
|
41
41
|
>
|
data/tests/unittest/entities.md
CHANGED
@@ -49,7 +49,12 @@ md_el(:document,[
|
|
49
49
|
*** Output of to_html ***
|
50
50
|
|
51
51
|
<p>Maruku translates HTML entities to the equivalent in LaTeX:</p>
|
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;'
|
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>
|
53
|
+
</tr><tr><td style='text-align: left;'><code>&pound;</code></td><td style='text-align: left;'>£</td>
|
54
|
+
</tr><tr><td style='text-align: left;'><code>a&nbsp;b</code></td><td style='text-align: left;'>a b</td>
|
55
|
+
</tr><tr><td style='text-align: left;'><code>&lambda;</code></td><td style='text-align: left;'>λ</td>
|
56
|
+
</tr><tr><td style='text-align: left;'><code>&mdash;</code></td><td style='text-align: left;'>—</td>
|
57
|
+
</tr></tbody></table>
|
53
58
|
<p>Entity-substitution does not happen in code blocks or inline code.</p>
|
54
59
|
|
55
60
|
<p>The following should not be translated:</p>
|
@@ -63,11 +68,11 @@ Maruku translates HTML entities to the equivalent in \LaTeX\xspace :
|
|
63
68
|
\begin{tabular}{l|l}
|
64
69
|
Entity&Result\\
|
65
70
|
\hline
|
66
|
-
\colorbox[rgb]{1.00,0.93,1.00}{\tt \
|
67
|
-
\colorbox[rgb]{1.00,0.93,1.00}{\tt \
|
68
|
-
\colorbox[rgb]{1.00,0.93,1.00}{\tt \
|
69
|
-
\colorbox[rgb]{1.00,0.93,1.00}{\tt \
|
70
|
-
\colorbox[rgb]{1.00,0.93,1.00}{\tt \
|
71
|
+
\colorbox[rgb]{1.00,0.93,1.00}{\tt \char38copy\char59}&\copyright \\
|
72
|
+
\colorbox[rgb]{1.00,0.93,1.00}{\tt \char38pound\char59}&\pounds \\
|
73
|
+
\colorbox[rgb]{1.00,0.93,1.00}{\tt a\char38nbsp\char59b}&a~b\\
|
74
|
+
\colorbox[rgb]{1.00,0.93,1.00}{\tt \char38lambda\char59}&$\lambda$\\
|
75
|
+
\colorbox[rgb]{1.00,0.93,1.00}{\tt \char38mdash\char59}&---\\
|
71
76
|
\end{tabular}
|
72
77
|
|
73
78
|
Entity-substitution does not happen in code blocks or inline code.
|
@@ -76,7 +81,7 @@ The following should not be translated:
|
|
76
81
|
|
77
82
|
\begin{verbatim}©
|
78
83
|
\end{verbatim}
|
79
|
-
It should read just like this: \colorbox[rgb]{1.00,0.93,1.00}{\tt \
|
84
|
+
It should read just like this: \colorbox[rgb]{1.00,0.93,1.00}{\tt \char38copy\char59}.
|
80
85
|
|
81
86
|
|
82
87
|
*** Output of to_md ***
|
data/tests/unittest/escaping.md
CHANGED
@@ -46,13 +46,13 @@ md_el(:document,[
|
|
46
46
|
*** Output of to_latex ***
|
47
47
|
Hello: ! ! ` \{ \} [ ] ( ) \# . ! * * *
|
48
48
|
|
49
|
-
Ora, {
|
49
|
+
Ora, \emph{emphasis}, \textbf{bold}, * {\tt \char60}- due asterischi-{\tt \char62} * , un underscore-{\tt \char62} \_ , \emph{emphasis}, incre\emph{dible}e!
|
50
50
|
|
51
|
-
This is \colorbox[rgb]{1.00,0.93,1.00}{\tt \
|
51
|
+
This is \colorbox[rgb]{1.00,0.93,1.00}{\tt Code~with~a~special\char58~\char45\char62~\char96~\char60\char45}(after)
|
52
52
|
|
53
|
-
\colorbox[rgb]{1.00,0.93,1.00}{\tt
|
53
|
+
\colorbox[rgb]{1.00,0.93,1.00}{\tt Start~} of paragraph
|
54
54
|
|
55
|
-
End of \colorbox[rgb]{1.00,0.93,1.00}{\tt
|
55
|
+
End of \colorbox[rgb]{1.00,0.93,1.00}{\tt paragraph~}
|
56
56
|
|
57
57
|
|
58
58
|
*** Output of to_md ***
|
@@ -21,7 +21,9 @@ md_el(:document,[
|
|
21
21
|
],{:align=>[:left, :left]},[])
|
22
22
|
],{},[])
|
23
23
|
*** Output of to_html ***
|
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
|
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>
|
25
|
+
</tr><tr><td style='text-align: left;'>Content Cell</td><td style='text-align: left;'>Content Cell</td>
|
26
|
+
</tr></tbody></table>
|
25
27
|
*** Output of to_latex ***
|
26
28
|
\begin{tabular}{l|l}
|
27
29
|
First Header&Second Header\\
|
data/tests/unittest/footnotes.md
CHANGED
@@ -55,19 +55,19 @@ md_el(:document,[
|
|
55
55
|
],{},[])
|
56
56
|
*** Output of to_html ***
|
57
57
|
|
58
|
-
<p>That
|
58
|
+
<p>That’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>
|
59
59
|
|
60
60
|
<p>This is not a footnote.</p>
|
61
61
|
<div class='footnotes'><hr /><ol><li id='fn:1'>
|
62
|
-
<p>And that
|
62
|
+
<p>And that’s the footnote. This is second sentence (same paragraph)</p>
|
63
63
|
<a href='#fnref:1' rev='footnote'>↩</a></li><li id='fn:2'>
|
64
64
|
<p>This is the very long one.</p>
|
65
65
|
|
66
|
-
<p>That
|
66
|
+
<p>That’s the second paragraph.</p>
|
67
67
|
<a href='#fnref:2' rev='footnote'>↩</a></li><li id='fn:3'>
|
68
|
-
<p>And that
|
68
|
+
<p>And that’s the footnote.</p>
|
69
69
|
|
70
|
-
<p>That
|
70
|
+
<p>That’s the second paragraph of the footnote.</p>
|
71
71
|
<a href='#fnref:3' rev='footnote'>↩</a></li></ol></div>
|
72
72
|
*** Output of to_latex ***
|
73
73
|
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.
|
data/tests/unittest/headers.md
CHANGED
@@ -28,11 +28,11 @@ md_el(:document,[
|
|
28
28
|
<h4 id='a_title_with_emphasis'>A title with <em>emphasis</em></h4>
|
29
29
|
|
30
30
|
*** Output of to_latex ***
|
31
|
-
\hypertarget{a_title_with_emphasis}{}\section*{{A title with {
|
31
|
+
\hypertarget{a_title_with_emphasis}{}\section*{{A title with \emph{emphasis}}}\label{a_title_with_emphasis}
|
32
32
|
|
33
|
-
\hypertarget{a_title_with_emphasis}{}\subsection*{{A title with {
|
33
|
+
\hypertarget{a_title_with_emphasis}{}\subsection*{{A title with \emph{emphasis}}}\label{a_title_with_emphasis}
|
34
34
|
|
35
|
-
\hypertarget{a_title_with_emphasis}{}\paragraph*{{A title with {
|
35
|
+
\hypertarget{a_title_with_emphasis}{}\paragraph*{{A title with \emph{emphasis}}}\label{a_title_with_emphasis}
|
36
36
|
|
37
37
|
|
38
38
|
*** Output of to_md ***
|
data/tests/unittest/images.md
CHANGED
@@ -53,15 +53,15 @@ md_el(:document,[
|
|
53
53
|
],{},[])
|
54
54
|
*** Output of to_html ***
|
55
55
|
|
56
|
-
<p>This page does not uilizes <img src='http://jigsaw.w3.org/css-validator/images/vcss' /></p>
|
56
|
+
<p>This page does not uilizes <img src='http://jigsaw.w3.org/css-validator/images/vcss' alt='' /></p>
|
57
57
|
|
58
|
-
<p>Please mouseover to see the title: <img
|
58
|
+
<p>Please mouseover to see the title: <img src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Title ok!' /></p>
|
59
59
|
|
60
|
-
<p>Please mouseover to see the title: <img
|
60
|
+
<p>Please mouseover to see the title: <img src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Title ok!' /></p>
|
61
61
|
|
62
|
-
<p>I
|
62
|
+
<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='Optional title attribute' /></p>
|
63
63
|
|
64
|
-
<p>This is double size: <img class='external' title='Optional title attribute' src='http://jigsaw.w3.org/css-validator/images/vcss' style='border:0;width:188px;height:131px' /></p>
|
64
|
+
<p>This is double size: <img class='external' title='Optional title attribute' src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Optional title attribute' style='border:0;width:188px;height:131px' /></p>
|
65
65
|
|
66
66
|
*** Output of to_latex ***
|
67
67
|
This page does not uilizes
|
@@ -70,9 +70,9 @@ Please mouseover to see the title:
|
|
70
70
|
|
71
71
|
Please mouseover to see the title:
|
72
72
|
|
73
|
-
I'll say it one more time: this page does not use {\bf Images not supported yet (\
|
73
|
+
I'll say it one more time: this page does not use {\bf Images not supported yet (http\char58\char47\char47jigsaw\char46w\char51\char46org\char47css\char45validator\char47images\char47vcss)}
|
74
74
|
|
75
|
-
This is double size: {\bf Images not supported yet (\
|
75
|
+
This is double size: {\bf Images not supported yet (http\char58\char47\char47jigsaw\char46w\char51\char46org\char47css\char45validator\char47images\char47vcss)}
|
76
76
|
|
77
77
|
|
78
78
|
*** Output of to_md ***
|
@@ -88,13 +88,59 @@ md_el(:document,[
|
|
88
88
|
<p>Result alone:</p>
|
89
89
|
<img src='http://jigsaw.w3.org/css-validator/images/vcss' />
|
90
90
|
<p>Without closing:</p>
|
91
|
-
<img src='http://jigsaw.w3.org/css-validator/images/vcss' /><div
|
92
|
-
<p>
|
93
|
-
</p
|
91
|
+
<img src='http://jigsaw.w3.org/css-validator/images/vcss' /><div>
|
92
|
+
<p>
|
93
|
+
<p>This is</p>
|
94
|
+
</p>
|
95
|
+
<em>
|
96
|
+
<p>
|
97
|
+
<p>true</p>
|
98
|
+
</p>
|
99
|
+
</em>
|
100
|
+
<p>
|
101
|
+
<p>markdown text (paragraph)</p>
|
102
|
+
</p>
|
103
|
+
<p>
|
104
|
+
<p>
|
105
|
+
<p>This is</p>
|
106
|
+
</p>
|
107
|
+
<em>
|
108
|
+
<p>
|
109
|
+
<p>true</p>
|
110
|
+
</p>
|
111
|
+
</em>
|
112
|
+
<p>
|
113
|
+
<p>markdown text (no paragraph)</p>
|
114
|
+
</p>
|
115
|
+
</p>
|
116
|
+
<p>
|
117
|
+
<p>
|
118
|
+
<p>This is</p>
|
119
|
+
</p>
|
120
|
+
<em>
|
121
|
+
<p>
|
122
|
+
<p>true</p>
|
123
|
+
</p>
|
124
|
+
</em>
|
125
|
+
<p>
|
126
|
+
<p>markdown text (block paragraph)</p>
|
127
|
+
</p>
|
128
|
+
</p>
|
129
|
+
</div><table>
|
94
130
|
<tr>
|
95
|
-
<td>This is <em>true</em> markdown text. (no par)</td>
|
96
131
|
<td>
|
97
|
-
<p>This is
|
132
|
+
<p>This is</p>
|
133
|
+
<em>
|
134
|
+
<p>true</p>
|
135
|
+
</em>
|
136
|
+
<p>markdown text. (no par)</p>
|
137
|
+
</td>
|
138
|
+
<td>
|
139
|
+
<p>This is</p>
|
140
|
+
<em>
|
141
|
+
<p>true</p>
|
142
|
+
</em>
|
143
|
+
<p>markdown text. (par)</p>
|
98
144
|
</td>
|
99
145
|
</tr>
|
100
146
|
</table>
|
data/tests/unittest/links.md
CHANGED
@@ -40,11 +40,11 @@ If all else fails, ask [Google](http://www.google.com)
|
|
40
40
|
http://images.google.com (Google images)
|
41
41
|
*** Output of inspect ***
|
42
42
|
md_el(:document,[
|
43
|
-
md_par(["Search on ", md_link(["Google"],"")]),
|
44
|
-
md_par(["Search on ", md_link(["Google"],"")]),
|
45
43
|
md_par(["Search on ", md_link(["Google"],"google")]),
|
46
44
|
md_par(["Search on ", md_link(["Google"],"google")]),
|
47
|
-
md_par(["Search on ", md_link(["Google
|
45
|
+
md_par(["Search on ", md_link(["Google"],"google")]),
|
46
|
+
md_par(["Search on ", md_link(["Google"],"google")]),
|
47
|
+
md_par(["Search on ", md_link(["Google images"],"google_images")]),
|
48
48
|
md_par(["Inline: ", md_im_link(["Google images"], "http://google.com", nil)]),
|
49
49
|
md_par([
|
50
50
|
"Inline with title: ",
|
@@ -71,8 +71,8 @@ md_el(:document,[
|
|
71
71
|
md_ref_def("google2", "http://www.google.com", {:title=>"Single quotes"}),
|
72
72
|
md_ref_def("google3", "http://www.google.com", {:title=>"Double quotes"}),
|
73
73
|
md_ref_def("google4", "http://www.google.com", {:title=>"Parenthesis"}),
|
74
|
-
md_ref_def("
|
75
|
-
md_ref_def("
|
74
|
+
md_ref_def("google_search", "http://www.google.com", {:title=>"Google search"}),
|
75
|
+
md_ref_def("google_images", "http://images.google.com", {:title=>"Google images"})
|
76
76
|
],{},[])
|
77
77
|
*** Output of to_html ***
|
78
78
|
|
@@ -113,7 +113,7 @@ Inline with title: \href{http://google.com}{Google images}
|
|
113
113
|
|
114
114
|
Inline with title: \href{http://google.com}{Google images}
|
115
115
|
|
116
|
-
Search on \href{http://www.gogole.com}{\
|
116
|
+
Search on \href{http://www.gogole.com}{http\char58\char47\char47www\char46gogole\char46com} or \href{http://Here.com}{http\char58\char47\char47Here\char46com} or ask \href{mailto:bill@google.com}{bill\char64google\char46com} or you might ask bill@google.com.
|
117
117
|
|
118
118
|
If all else fails, ask \href{http://www.google.com}{Google}
|
119
119
|
|
@@ -168,7 +168,7 @@ Search on GoogleSearch on GoogleSearch on GoogleSearch on GoogleSearch on Google
|
|
168
168
|
|
169
169
|
<p>Inline with title: <a href="http://google.com "Title"">Google images</a></p>
|
170
170
|
|
171
|
-
<p>Search on <a href="http://www.gogole.com">http://www.gogole.com</a> or <a href="http://Here.com">http://Here.com</a> or ask <a href="&#
|
171
|
+
<p>Search on <a href="http://www.gogole.com">http://www.gogole.com</a> or <a href="http://Here.com">http://Here.com</a> or ask <a href="mailto:bill@google.com">bill@google.com</a>
|
172
172
|
or you might ask bill@google.com.</p>
|
173
173
|
|
174
174
|
<p>If all else fails, ask <a href="http://www.google.com">Google</a></p>
|
data/tests/unittest/list2.md
CHANGED
@@ -30,7 +30,7 @@ md_el(:document,[
|
|
30
30
|
<li>
|
31
31
|
<p>This is a list item with two paragraphs.</p>
|
32
32
|
|
33
|
-
<p>This is the second paragraph in the list item. You
|
33
|
+
<p>This is the second paragraph in the list item. You’re only required to indent the first line. Lorem ipsum dolo sit amet, consectetuer adipiscing elit</p>
|
34
34
|
</li>
|
35
35
|
|
36
36
|
<li>
|
data/tests/unittest/lists.md
CHANGED
@@ -112,7 +112,7 @@ md_el(:document,[
|
|
112
112
|
<li>
|
113
113
|
<p>This is a list item with two paragraphs.</p>
|
114
114
|
|
115
|
-
<p>This is the second paragraph in the list item. You
|
115
|
+
<p>This is the second paragraph in the list item. You’re only required to indent the first line. Lorem ipsum dolo sit amet, consectetuer adipiscing elit</p>
|
116
116
|
</li>
|
117
117
|
|
118
118
|
<li>
|
data/tests/unittest/lists_ol.md
CHANGED
@@ -153,7 +153,7 @@ md_el(:document,[
|
|
153
153
|
<li>
|
154
154
|
<p>This is a list item with two paragraphs.</p>
|
155
155
|
|
156
|
-
<p>This is the second paragraph in the list item. You
|
156
|
+
<p>This is the second paragraph in the list item. You’re only required to indent the first line. Lorem ipsum dolo sit amet, consectetuer adipiscing elit</p>
|
157
157
|
</li>
|
158
158
|
|
159
159
|
<li>
|
@@ -0,0 +1,82 @@
|
|
1
|
+
Write a comment here
|
2
|
+
*** Parameters: ***
|
3
|
+
{}
|
4
|
+
*** Markdown input: ***
|
5
|
+
|
6
|
+
$$ x = y $$
|
7
|
+
|
8
|
+
$$ x
|
9
|
+
= y $$
|
10
|
+
|
11
|
+
$$
|
12
|
+
x = y $$
|
13
|
+
|
14
|
+
$$ x = y
|
15
|
+
$$
|
16
|
+
|
17
|
+
*** Output of inspect ***
|
18
|
+
md_el(:document,[
|
19
|
+
md_par(["$$ x = y $$"]),
|
20
|
+
md_el(:header,["$$ x"],{:level=>1},[]),
|
21
|
+
md_par(["$$ x = y $$"]),
|
22
|
+
md_par(["$$ x = y $$"])
|
23
|
+
],{},[])
|
24
|
+
*** Output of to_html ***
|
25
|
+
|
26
|
+
<p>$$ x = y $$</p>
|
27
|
+
|
28
|
+
<h1 id='_x'>$$ x</h1>
|
29
|
+
|
30
|
+
<p>$$ x = y $$</p>
|
31
|
+
|
32
|
+
<p>$$ x = y $$</p>
|
33
|
+
|
34
|
+
*** Output of to_latex ***
|
35
|
+
\$\$ x = y \$\$
|
36
|
+
|
37
|
+
\hypertarget{_x}{}\section*{{\$\$ x}}\label{_x}
|
38
|
+
|
39
|
+
\$\$ x = y \$\$
|
40
|
+
|
41
|
+
\$\$ x = y \$\$
|
42
|
+
|
43
|
+
|
44
|
+
*** Output of to_md ***
|
45
|
+
$$ x = y $$
|
46
|
+
|
47
|
+
$$ x$$ x = y $$
|
48
|
+
|
49
|
+
$$ x = y $$
|
50
|
+
|
51
|
+
|
52
|
+
*** Output of to_s ***
|
53
|
+
$$ x = y $$$$ x$$ x = y $$$$ x = y $$
|
54
|
+
*** EOF ***
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
OK!
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
*** Output of Markdown.pl ***
|
63
|
+
<p>$$ x = y $$</p>
|
64
|
+
|
65
|
+
<p>$$ x
|
66
|
+
= y $$</p>
|
67
|
+
|
68
|
+
<p>$$
|
69
|
+
x = y $$</p>
|
70
|
+
|
71
|
+
<p>$$ x = y
|
72
|
+
$$</p>
|
73
|
+
|
74
|
+
*** Output of Markdown.pl (parsed) ***
|
75
|
+
<p>$$ x = y $$</p
|
76
|
+
><p>$$ x
|
77
|
+
= y $$</p
|
78
|
+
><p>$$
|
79
|
+
x = y $$</p
|
80
|
+
><p>$$ x = y
|
81
|
+
$$</p
|
82
|
+
>
|