maruku 0.4.2.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. data/bin/maruku +66 -20
  2. data/bin/marutest +12 -2
  3. data/docs/changelog.html +188 -23
  4. data/docs/changelog.md +128 -5
  5. data/docs/entity_test.html +245 -240
  6. data/docs/entity_test.md +2 -0
  7. data/docs/exd.html +181 -23
  8. data/docs/index.html +130 -349
  9. data/docs/markdown_syntax.html +55 -51
  10. data/docs/maruku.html +130 -349
  11. data/docs/maruku.md +154 -339
  12. data/docs/math.md +143 -0
  13. data/docs/proposal.html +16 -12
  14. data/lib/maruku.rb +6 -3
  15. data/lib/maruku/attributes.rb +7 -2
  16. data/lib/maruku/defaults.rb +27 -27
  17. data/lib/maruku/errors_management.rb +10 -9
  18. data/lib/maruku/ext/diagrams/diagrams.rb +8 -0
  19. data/lib/maruku/ext/diagrams/grid.rb +78 -0
  20. data/lib/maruku/ext/diagrams/inspect.rb +11 -0
  21. data/lib/maruku/ext/diagrams/layout.rb +105 -0
  22. data/lib/maruku/ext/diagrams/parser.rb +219 -0
  23. data/lib/maruku/ext/diagrams/structures.rb +168 -0
  24. data/lib/maruku/ext/diagrams/to_html.rb +37 -0
  25. data/lib/maruku/ext/diagrams/to_latex.rb +308 -0
  26. data/lib/maruku/ext/diagrams/unittest.rb +123 -0
  27. data/lib/maruku/ext/math.rb +11 -0
  28. data/lib/maruku/ext/math/elements.rb +26 -0
  29. data/lib/maruku/ext/math/mathml_engines/blahtex.rb +108 -0
  30. data/lib/maruku/ext/math/mathml_engines/itex2mml.rb +29 -0
  31. data/lib/maruku/ext/math/mathml_engines/none.rb +20 -0
  32. data/lib/maruku/ext/math/mathml_engines/ritex.rb +24 -0
  33. data/lib/maruku/ext/math/parsing.rb +82 -0
  34. data/lib/maruku/ext/math/to_html.rb +178 -0
  35. data/lib/maruku/ext/math/to_latex.rb +21 -0
  36. data/lib/maruku/helpers.rb +11 -0
  37. data/lib/maruku/input/charsource.rb +1 -1
  38. data/lib/maruku/input/extensions.rb +68 -0
  39. data/lib/maruku/input/html_helper.rb +91 -60
  40. data/lib/maruku/input/parse_block.rb +10 -9
  41. data/lib/maruku/input/parse_doc.rb +21 -13
  42. data/lib/maruku/input/parse_span_better.rb +19 -8
  43. data/lib/maruku/input/type_detection.rb +5 -3
  44. data/lib/maruku/output/to_html.rb +236 -67
  45. data/lib/maruku/output/to_latex.rb +69 -26
  46. data/lib/maruku/output/to_latex_entities.rb +14 -2
  47. data/lib/maruku/output/to_s.rb +8 -0
  48. data/lib/maruku/structures.rb +1 -1
  49. data/lib/maruku/tests/benchmark.rb +2 -2
  50. data/lib/maruku/tests/new_parser.rb +13 -5
  51. data/lib/maruku/version.rb +1 -1
  52. data/lib/sort_prof.rb +22 -0
  53. data/tests/diagrams/diagrams.md +54 -0
  54. data/tests/math/syntax.md +46 -0
  55. data/tests/math_usage/document.md +13 -0
  56. data/tests/unittest/attributes/attributes.md +50 -6
  57. data/tests/unittest/easy.md +1 -1
  58. data/tests/unittest/email.md +3 -3
  59. data/tests/unittest/entities.md +12 -7
  60. data/tests/unittest/escaping.md +4 -4
  61. data/tests/unittest/extra_table1.md +3 -1
  62. data/tests/unittest/footnotes.md +5 -5
  63. data/tests/unittest/headers.md +3 -3
  64. data/tests/unittest/images.md +7 -7
  65. data/tests/unittest/inline_html.md +51 -5
  66. data/tests/unittest/links.md +7 -7
  67. data/tests/unittest/list2.md +1 -1
  68. data/tests/unittest/lists.md +1 -1
  69. data/tests/unittest/lists_after_paragraph.md +1 -1
  70. data/tests/unittest/lists_ol.md +1 -1
  71. data/tests/unittest/math/equations.md +82 -0
  72. data/tests/unittest/math/inline.md +80 -0
  73. data/tests/unittest/math/table.md +51 -0
  74. data/tests/unittest/math/table2.md +67 -0
  75. data/tests/unittest/misc_sw.md +24 -24
  76. data/tests/unittest/notyet/ticks.md +1 -1
  77. data/tests/unittest/references/long_example.md +2 -2
  78. data/tests/unittest/smartypants.md +4 -4
  79. data/tests/unittest/xml.md +68 -0
  80. data/tests/unittest/xml2.md +36 -0
  81. data/tests/unittest/xml3.md +52 -0
  82. data/tests/unittest/xml_instruction.md +5 -5
  83. metadata +33 -4
  84. data/docs/a.html +0 -6
  85. 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 {\em emphasis}
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
  >
@@ -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
- {\em Hello!} how are {\bf you}?
13
+ \emph{Hello!} how are \textbf{you}?
14
14
 
15
15
 
16
16
  *** Output of to_md ***
@@ -15,7 +15,7 @@ md_el(:document,[
15
15
  <p>This is an email address: <a href='mailto:andrea@invalid.it'>&#097;&#110;&#100;&#114;&#101;&#097;&#064;&#105;&#110;&#118;&#097;&#108;&#105;&#100;&#046;&#105;&#116;</a></p>
16
16
 
17
17
  *** Output of to_latex ***
18
- This is an email address: \href{mailto:andrea@invalid.it}{\char97\char110\char100\char114\char101\char97\char64\char105\char110\char118\char97\char108\char105\char100\char46\char105\char116}
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="m&#x61;&#105;&#x6C;&#x74;o:&#97;&#x6E;&#x64;&#114;&#x65;&#97;&#64;&#x69;&#x6E;&#118;&#97;l&#x69;&#x64;.&#x69;&#x74;">&#97;&#x6E;&#x64;&#114;&#x65;&#97;&#64;&#x69;&#x6E;&#118;&#97;l&#x69;&#x64;.&#x69;&#x74;</a></p>
36
+ <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;">&#97;&#x6E;&#100;&#114;&#x65;&#97;&#64;&#105;&#x6E;&#x76;&#x61;&#x6C;&#x69;&#x64;.&#x69;&#116;</a></p>
37
37
 
38
38
  *** Output of Markdown.pl (parsed) ***
39
- <p>This is an email address: <a href='m&amp;#x61;&amp;#105;&amp;#x6C;&amp;#x74;o:&amp;#97;&amp;#x6E;&amp;#x64;&amp;#114;&amp;#x65;&amp;#97;&amp;#64;&amp;#x69;&amp;#x6E;&amp;#118;&amp;#97;l&amp;#x69;&amp;#x64;.&amp;#x69;&amp;#x74;'>&#97;&#x6E;&#x64;&#114;&#x65;&#97;&#64;&#x69;&#x6E;&#118;&#97;l&#x69;&#x64;.&#x69;&#x74;</a
39
+ <p>This is an email address: <a href='&amp;#x6D;&amp;#x61;&amp;#x69;&amp;#108;t&amp;#x6F;:&amp;#97;&amp;#x6E;&amp;#100;&amp;#114;&amp;#x65;&amp;#97;&amp;#64;&amp;#105;&amp;#x6E;&amp;#x76;&amp;#x61;&amp;#x6C;&amp;#x69;&amp;#x64;.&amp;#x69;&amp;#116;'>&#97;&#x6E;&#100;&#114;&#x65;&#97;&#64;&#105;&#x6E;&#x76;&#x61;&#x6C;&#x69;&#x64;.&#x69;&#116;</a
40
40
  ></p
41
41
  >
@@ -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>&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>
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;'>&#169;</td>
53
+ </tr><tr><td style='text-align: left;'><code>&amp;pound;</code></td><td style='text-align: left;'>&#163;</td>
54
+ </tr><tr><td style='text-align: left;'><code>a&amp;nbsp;b</code></td><td style='text-align: left;'>a&#160;b</td>
55
+ </tr><tr><td style='text-align: left;'><code>&amp;lambda;</code></td><td style='text-align: left;'>&#955;</td>
56
+ </tr><tr><td style='text-align: left;'><code>&amp;mdash;</code></td><td style='text-align: left;'>&#8212;</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 \char38\char99\char111\char112\char121\char59}&\copyright \\
67
- \colorbox[rgb]{1.00,0.93,1.00}{\tt \char38\char112\char111\char117\char110\char100\char59}&\pounds \\
68
- \colorbox[rgb]{1.00,0.93,1.00}{\tt \char97\char38\char110\char98\char115\char112\char59\char98}&a~b\\
69
- \colorbox[rgb]{1.00,0.93,1.00}{\tt \char38\char108\char97\char109\char98\char100\char97\char59}&$\lambda$\\
70
- \colorbox[rgb]{1.00,0.93,1.00}{\tt \char38\char109\char100\char97\char115\char104\char59}&---\\
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}&copy;
78
83
  \end{verbatim}
79
- It should read just like this: \colorbox[rgb]{1.00,0.93,1.00}{\tt \char38\char99\char111\char112\char121\char59}.
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 ***
@@ -46,13 +46,13 @@ md_el(:document,[
46
46
  *** Output of to_latex ***
47
47
  Hello: ! ! ` \{ \} [ ] ( ) \# . ! * * *
48
48
 
49
- Ora, {\em emphasis}, {\bf bold}, * {\tt \char60}- due asterischi-{\tt \char62} * , un underscore-{\tt \char62} \_ , {\em emphasis}, incre{\em dible}e!
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 \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.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 \char83\char116\char97\char114\char116\char32} of paragraph
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 \char112\char97\char114\char97\char103\char114\char97\char112\char104\char32}
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></tr><tr><td style='text-align: left;'>Content Cell</td><td style='text-align: left;'>Content Cell</td></tr></tbody></table>
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\\
@@ -55,19 +55,19 @@ md_el(:document,[
55
55
  ],{},[])
56
56
  *** Output of to_html ***
57
57
 
58
- <p>That&rsquo;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>
58
+ <p>That&#8217;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&rsquo;s the footnote. This is second sentence (same paragraph)</p>
62
+ <p>And that&#8217;s the footnote. This is second sentence (same paragraph)</p>
63
63
  <a href='#fnref:1' rev='footnote'>&#8617;</a></li><li id='fn:2'>
64
64
  <p>This is the very long one.</p>
65
65
 
66
- <p>That&rsquo;s the second paragraph.</p>
66
+ <p>That&#8217;s the second paragraph.</p>
67
67
  <a href='#fnref:2' rev='footnote'>&#8617;</a></li><li id='fn:3'>
68
- <p>And that&rsquo;s the footnote.</p>
68
+ <p>And that&#8217;s the footnote.</p>
69
69
 
70
- <p>That&rsquo;s the second paragraph of the footnote.</p>
70
+ <p>That&#8217;s the second paragraph of the footnote.</p>
71
71
  <a href='#fnref:3' rev='footnote'>&#8617;</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.
@@ -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 {\em emphasis}}}\label{a_title_with_emphasis}
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 {\em emphasis}}}\label{a_title_with_emphasis}
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 {\em emphasis}}}\label{a_title_with_emphasis}
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 ***
@@ -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 title='Title ok!' src='http://jigsaw.w3.org/css-validator/images/vcss' /></p>
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 title='Title ok!' src='http://jigsaw.w3.org/css-validator/images/vcss' /></p>
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&rsquo;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' /></p>
62
+ <p>I&#8217;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 (\char104\char116\char116\char112\char58\char47\char47\char106\char105\char103\char115\char97\char119\char46\char119\char51\char46\char111\char114\char103\char47\char99\char115\char115\char45\char118\char97\char108\char105\char100\char97\char116\char111\char114\char47\char105\char109\char97\char103\char101\char115\char47\char118\char99\char115\char115)}
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 (\char104\char116\char116\char112\char58\char47\char47\char106\char105\char103\char115\char97\char119\char46\char119\char51\char46\char111\char114\char103\char47\char99\char115\char115\char45\char118\char97\char108\char105\char100\char97\char116\char111\char114\char47\char105\char109\char97\char103\char101\char115\char47\char118\char99\char115\char115)}
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><p>This is <em>true</em> markdown text (paragraph)</p><p>This is <em>true</em> markdown text (no paragraph)</p><p>
92
- <p>This is <em>true</em> markdown text (block paragraph)</p>
93
- </p></div><table>
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 <em>true</em> markdown text. (par)</p>
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>
@@ -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 images"],"")]),
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("google search", "http://www.google.com", {:title=>"Google search"}),
75
- md_ref_def("google images", "http://images.google.com", {:title=>"Google images"})
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}{\char104\char116\char116\char112\char58\char47\char47\char119\char119\char119\char46\char103\char111\char103\char111\char108\char101\char46\char99\char111\char109} or \href{http://Here.com}{\char104\char116\char116\char112\char58\char47\char47\char72\char101\char114\char101\char46\char99\char111\char109} or ask \href{mailto:bill@google.com}{\char98\char105\char108\char108\char64\char103\char111\char111\char103\char108\char101\char46\char99\char111\char109} or you might ask bill@google.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="&#109;&#x61;&#105;&#x6C;t&#111;:&#98;&#x69;&#108;&#108;&#64;&#103;&#x6F;&#x6F;g&#108;&#101;&#46;&#99;&#x6F;&#x6D;">&#98;&#x69;&#108;&#108;&#64;&#103;&#x6F;&#x6F;g&#108;&#101;&#46;&#99;&#x6F;&#x6D;</a>
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="&#x6D;&#97;&#x69;&#108;&#116;&#x6F;:&#98;i&#108;&#x6C;&#64;&#103;o&#x6F;&#103;l&#x65;&#46;&#99;&#x6F;&#x6D;">&#98;i&#108;&#x6C;&#64;&#103;o&#x6F;&#103;l&#x65;&#46;&#99;&#x6F;&#x6D;</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>
@@ -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&rsquo;re only required to indent the first line. Lorem ipsum dolo sit amet, consectetuer adipiscing elit</p>
33
+ <p>This is the second paragraph in the list item. You&#8217;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>
@@ -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&rsquo;re only required to indent the first line. Lorem ipsum dolo sit amet, consectetuer adipiscing elit</p>
115
+ <p>This is the second paragraph in the list item. You&#8217;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>
@@ -166,7 +166,7 @@ Paragraph with html after
166
166
 
167
167
  Paragraph with html after, indented:
168
168
 
169
- Paragraph with html after, indented: {\em tralla}
169
+ Paragraph with html after, indented: \emph{tralla}
170
170
 
171
171
  Paragraph with html after, indented:
172
172
 
@@ -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&rsquo;re only required to indent the first line. Lorem ipsum dolo sit amet, consectetuer adipiscing elit</p>
156
+ <p>This is the second paragraph in the list item. You&#8217;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
+ >