patcito-maruku 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. data/AUTHORS +23 -0
  2. data/LICENSE +340 -0
  3. data/README.md +73 -0
  4. data/bin/maruku +196 -0
  5. data/bin/marutex +4 -0
  6. data/data/entities.xml +261 -0
  7. data/docs/changelog.md +334 -0
  8. data/docs/div_syntax.md +36 -0
  9. data/docs/entity_test.md +23 -0
  10. data/docs/markdown_syntax.md +899 -0
  11. data/docs/maruku.md +346 -0
  12. data/docs/math.md +194 -0
  13. data/docs/other_stuff.md +51 -0
  14. data/docs/proposal.md +309 -0
  15. data/docs/website/src/bluecloth.md +25 -0
  16. data/docs/website/src/download.md +31 -0
  17. data/docs/website/src/maruku.md +261 -0
  18. data/docs/website/src/proposal.md +271 -0
  19. data/lib/maruku.rb +132 -0
  20. data/lib/maruku/attributes.rb +138 -0
  21. data/lib/maruku/defaults.rb +69 -0
  22. data/lib/maruku/errors.rb +89 -0
  23. data/lib/maruku/ext/div.rb +121 -0
  24. data/lib/maruku/ext/fenced_code.rb +78 -0
  25. data/lib/maruku/ext/math.rb +37 -0
  26. data/lib/maruku/ext/math/elements.rb +21 -0
  27. data/lib/maruku/ext/math/latex_fix.rb +12 -0
  28. data/lib/maruku/ext/math/mathml_engines/blahtex.rb +93 -0
  29. data/lib/maruku/ext/math/mathml_engines/itex2mml.rb +39 -0
  30. data/lib/maruku/ext/math/mathml_engines/none.rb +21 -0
  31. data/lib/maruku/ext/math/mathml_engines/ritex.rb +24 -0
  32. data/lib/maruku/ext/math/parsing.rb +125 -0
  33. data/lib/maruku/ext/math/to_html.rb +237 -0
  34. data/lib/maruku/ext/math/to_latex.rb +36 -0
  35. data/lib/maruku/ext/yaml.rb +43 -0
  36. data/lib/maruku/helpers.rb +214 -0
  37. data/lib/maruku/input/charsource.rb +326 -0
  38. data/lib/maruku/input/extensions.rb +69 -0
  39. data/lib/maruku/input/html_helper.rb +189 -0
  40. data/lib/maruku/input/linesource.rb +111 -0
  41. data/lib/maruku/input/parse_block.rb +608 -0
  42. data/lib/maruku/input/parse_doc.rb +240 -0
  43. data/lib/maruku/input/parse_span_better.rb +746 -0
  44. data/lib/maruku/input/rubypants.rb +225 -0
  45. data/lib/maruku/input/type_detection.rb +147 -0
  46. data/lib/maruku/input_textile2/t2_parser.rb +163 -0
  47. data/lib/maruku/maruku.rb +31 -0
  48. data/lib/maruku/output/s5/fancy.rb +756 -0
  49. data/lib/maruku/output/s5/to_s5.rb +138 -0
  50. data/lib/maruku/output/to_html.rb +994 -0
  51. data/lib/maruku/output/to_latex.rb +580 -0
  52. data/lib/maruku/output/to_latex_entities.rb +101 -0
  53. data/lib/maruku/output/to_latex_strings.rb +64 -0
  54. data/lib/maruku/output/to_markdown.rb +164 -0
  55. data/lib/maruku/output/to_s.rb +54 -0
  56. data/lib/maruku/string_utils.rb +185 -0
  57. data/lib/maruku/structures.rb +143 -0
  58. data/lib/maruku/structures_inspect.rb +51 -0
  59. data/lib/maruku/structures_iterators.rb +48 -0
  60. data/lib/maruku/textile2.rb +1 -0
  61. data/lib/maruku/toc.rb +214 -0
  62. data/lib/maruku/usage/example1.rb +33 -0
  63. data/lib/maruku/version +0 -0
  64. data/lib/maruku/version.rb +54 -0
  65. data/spec/block_docs/abbreviations.md +52 -0
  66. data/spec/block_docs/alt.md +17 -0
  67. data/spec/block_docs/attributes/att2.md +20 -0
  68. data/spec/block_docs/attributes/att3.md +28 -0
  69. data/spec/block_docs/attributes/attributes.md +57 -0
  70. data/spec/block_docs/attributes/circular.md +26 -0
  71. data/spec/block_docs/attributes/default.md +22 -0
  72. data/spec/block_docs/blank.md +24 -0
  73. data/spec/block_docs/blanks_in_code.md +75 -0
  74. data/spec/block_docs/bug_def.md +16 -0
  75. data/spec/block_docs/bug_table.md +46 -0
  76. data/spec/block_docs/code.md +34 -0
  77. data/spec/block_docs/code2.md +28 -0
  78. data/spec/block_docs/code3.md +71 -0
  79. data/spec/block_docs/data_loss.md +25 -0
  80. data/spec/block_docs/divs/div1.md +167 -0
  81. data/spec/block_docs/divs/div2.md +21 -0
  82. data/spec/block_docs/divs/div3_nest.md +45 -0
  83. data/spec/block_docs/easy.md +15 -0
  84. data/spec/block_docs/email.md +20 -0
  85. data/spec/block_docs/encoding/iso-8859-1.md +23 -0
  86. data/spec/block_docs/encoding/utf-8.md +18 -0
  87. data/spec/block_docs/entities.md +94 -0
  88. data/spec/block_docs/escaping.md +67 -0
  89. data/spec/block_docs/extra_dl.md +52 -0
  90. data/spec/block_docs/extra_header_id.md +63 -0
  91. data/spec/block_docs/extra_table1.md +37 -0
  92. data/spec/block_docs/footnotes.md +97 -0
  93. data/spec/block_docs/headers.md +37 -0
  94. data/spec/block_docs/hex_entities.md +37 -0
  95. data/spec/block_docs/hrule.md +39 -0
  96. data/spec/block_docs/html2.md +22 -0
  97. data/spec/block_docs/html3.md +31 -0
  98. data/spec/block_docs/html4.md +25 -0
  99. data/spec/block_docs/html5.md +23 -0
  100. data/spec/block_docs/ie.md +49 -0
  101. data/spec/block_docs/images.md +90 -0
  102. data/spec/block_docs/images2.md +31 -0
  103. data/spec/block_docs/inline_html.md +152 -0
  104. data/spec/block_docs/inline_html2.md +21 -0
  105. data/spec/block_docs/links.md +152 -0
  106. data/spec/block_docs/links2.md +22 -0
  107. data/spec/block_docs/list1.md +46 -0
  108. data/spec/block_docs/list12.md +28 -0
  109. data/spec/block_docs/list2.md +56 -0
  110. data/spec/block_docs/list3.md +64 -0
  111. data/spec/block_docs/list4.md +89 -0
  112. data/spec/block_docs/lists.md +192 -0
  113. data/spec/block_docs/lists10.md +34 -0
  114. data/spec/block_docs/lists11.md +23 -0
  115. data/spec/block_docs/lists6.md +41 -0
  116. data/spec/block_docs/lists9.md +64 -0
  117. data/spec/block_docs/lists_after_paragraph.md +208 -0
  118. data/spec/block_docs/lists_ol.md +262 -0
  119. data/spec/block_docs/loss.md +16 -0
  120. data/spec/block_docs/math/equations.md +45 -0
  121. data/spec/block_docs/math/inline.md +46 -0
  122. data/spec/block_docs/math/math2.md +45 -0
  123. data/spec/block_docs/math/notmath.md +25 -0
  124. data/spec/block_docs/math/table.md +25 -0
  125. data/spec/block_docs/math/table2.md +42 -0
  126. data/spec/block_docs/misc_sw.md +525 -0
  127. data/spec/block_docs/notyet/escape.md +21 -0
  128. data/spec/block_docs/notyet/header_after_par.md +58 -0
  129. data/spec/block_docs/notyet/ticks.md +18 -0
  130. data/spec/block_docs/notyet/triggering.md +157 -0
  131. data/spec/block_docs/olist.md +45 -0
  132. data/spec/block_docs/one.md +15 -0
  133. data/spec/block_docs/paragraph.md +16 -0
  134. data/spec/block_docs/paragraph_rules/dont_merge_ref.md +42 -0
  135. data/spec/block_docs/paragraph_rules/tab_is_blank.md +24 -0
  136. data/spec/block_docs/paragraphs.md +46 -0
  137. data/spec/block_docs/pending/amps.md +15 -0
  138. data/spec/block_docs/pending/empty_cells.md +37 -0
  139. data/spec/block_docs/pending/link.md +72 -0
  140. data/spec/block_docs/pending/ref.md +21 -0
  141. data/spec/block_docs/recover/recover_links.md +15 -0
  142. data/spec/block_docs/red_tests/abbrev.md +679 -0
  143. data/spec/block_docs/red_tests/lists7.md +32 -0
  144. data/spec/block_docs/red_tests/lists7b.md +65 -0
  145. data/spec/block_docs/red_tests/lists8.md +42 -0
  146. data/spec/block_docs/red_tests/ref.md +23 -0
  147. data/spec/block_docs/red_tests/xml.md +35 -0
  148. data/spec/block_docs/references/long_example.md +71 -0
  149. data/spec/block_docs/references/spaces_and_numbers.md +15 -0
  150. data/spec/block_docs/smartypants.md +114 -0
  151. data/spec/block_docs/syntax_hl.md +52 -0
  152. data/spec/block_docs/table_attributes.md +34 -0
  153. data/spec/block_docs/test.md +19 -0
  154. data/spec/block_docs/underscore_in_words.md +15 -0
  155. data/spec/block_docs/wrapping.md +67 -0
  156. data/spec/block_docs/xml2.md +19 -0
  157. data/spec/block_docs/xml3.md +26 -0
  158. data/spec/block_docs/xml_instruction.md +52 -0
  159. data/spec/block_spec.rb +49 -0
  160. data/spec/span_spec.rb +254 -0
  161. data/spec/spec_helper.rb +6 -0
  162. metadata +247 -0
@@ -0,0 +1,18 @@
1
+ Write a comment abouth the test here.
2
+ *** Parameters: ***
3
+ {:italian=>"\303\240\303\250\303\254\303\262\303\271."}
4
+ *** Markdown input: ***
5
+ Italian: àèìòù.
6
+
7
+ Japanese: マルク
8
+
9
+ *** Output of inspect ***
10
+ md_el(:document,[md_par(["Japanese: \343\203\236\343\203\253\343\202\257"])],{},[])
11
+ *** Output of to_html ***
12
+ <p>Japanese: マルク</p>
13
+ *** Output of to_latex ***
14
+ Japanese: マルク
15
+ *** Output of to_md ***
16
+ Japanese: マルク
17
+ *** Output of to_s ***
18
+ Japanese: マルク
@@ -0,0 +1,94 @@
1
+ Write a comment abouth the test here.
2
+ *** Parameters: ***
3
+ {}
4
+ *** Markdown input: ***
5
+ Maruku translates HTML entities to the equivalent in LaTeX:
6
+
7
+ Entity | Result
8
+ ------------|----------
9
+ `&copy;` | &copy;
10
+ `&pound;` | &pound;
11
+ `a&nbsp;b` | a&nbsp;b
12
+ `&lambda;` | &lambda;
13
+ `&mdash;` | &mdash;
14
+
15
+
16
+ Entity-substitution does not happen in code blocks or inline code.
17
+
18
+ The following should not be translated:
19
+
20
+ &copy;
21
+
22
+ It should read just like this: `&copy;`.
23
+
24
+
25
+ *** Output of inspect ***
26
+ md_el(:document,[
27
+ md_par(["Maruku translates HTML entities to the equivalent in LaTeX:"]),
28
+ md_el(:table,[
29
+ md_el(:head_cell,["Entity"],{},[]),
30
+ md_el(:head_cell,["Result"],{},[]),
31
+ md_el(:cell,[md_code("&copy;")],{},[]),
32
+ md_el(:cell,[md_entity("copy")],{},[]),
33
+ md_el(:cell,[md_code("&pound;")],{},[]),
34
+ md_el(:cell,[md_entity("pound")],{},[]),
35
+ md_el(:cell,[md_code("a&nbsp;b")],{},[]),
36
+ md_el(:cell,["a", md_entity("nbsp"), "b"],{},[]),
37
+ md_el(:cell,[md_code("&lambda;")],{},[]),
38
+ md_el(:cell,[md_entity("lambda")],{},[]),
39
+ md_el(:cell,[md_code("&mdash;")],{},[]),
40
+ md_el(:cell,[md_entity("mdash")],{},[])
41
+ ],{:align=>[:left, :left]},[]),
42
+ md_par([
43
+ "Entity-substitution does not happen in code blocks or inline code."
44
+ ]),
45
+ md_par(["The following should not be translated:"]),
46
+ md_el(:code,[],{:raw_code=>"&copy;"},[]),
47
+ md_par(["It should read just like this: ", md_code("&copy;"), "."])
48
+ ],{},[])
49
+ *** Output of to_html ***
50
+ <p>Maruku translates HTML entities to the equivalent in LaTeX:</p>
51
+ <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>
52
+ </tr><tr><td style='text-align: left;'><code>&amp;pound;</code></td><td style='text-align: left;'>&#163;</td>
53
+ </tr><tr><td style='text-align: left;'><code>a&amp;nbsp;b</code></td><td style='text-align: left;'>a&#160;b</td>
54
+ </tr><tr><td style='text-align: left;'><code>&amp;lambda;</code></td><td style='text-align: left;'>&#955;</td>
55
+ </tr><tr><td style='text-align: left;'><code>&amp;mdash;</code></td><td style='text-align: left;'>&#8212;</td>
56
+ </tr></tbody></table>
57
+ <p>Entity-substitution does not happen in code blocks or inline code.</p>
58
+
59
+ <p>The following should not be translated:</p>
60
+
61
+ <pre><code>&amp;copy;</code></pre>
62
+
63
+ <p>It should read just like this: <code>&amp;copy;</code>.</p>
64
+ *** Output of to_latex ***
65
+ Maruku translates HTML entities to the equivalent in \LaTeX\xspace :
66
+
67
+ \begin{tabular}{l|l}
68
+ Entity&Result\\
69
+ \hline
70
+ {\colorbox[rgb]{1.00,0.93,1.00}{\tt \char38copy\char59}}&\copyright{}\\
71
+ {\colorbox[rgb]{1.00,0.93,1.00}{\tt \char38pound\char59}}&\pounds{}\\
72
+ {\colorbox[rgb]{1.00,0.93,1.00}{\tt a\char38nbsp\char59b}}&a~{}b\\
73
+ {\colorbox[rgb]{1.00,0.93,1.00}{\tt \char38lambda\char59}}&$\lambda${}\\
74
+ {\colorbox[rgb]{1.00,0.93,1.00}{\tt \char38mdash\char59}}&---{}\\
75
+ \end{tabular}
76
+
77
+ Entity-substitution does not happen in code blocks or inline code.
78
+
79
+ The following should not be translated:
80
+
81
+ \begin{verbatim}&copy;\end{verbatim}
82
+ It should read just like this: {\colorbox[rgb]{1.00,0.93,1.00}{\tt \char38copy\char59}}.
83
+ *** Output of to_md ***
84
+ Maruku translates HTML entities to the
85
+ equivalent in LaTeX:
86
+
87
+ EntityResultabEntity-substitution does not happen in
88
+ code blocks or inline code.
89
+
90
+ The following should not be translated:
91
+
92
+ It should read just like this: .
93
+ *** Output of to_s ***
94
+ 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: .
@@ -0,0 +1,67 @@
1
+ This should threat the last as a literal asterisk.
2
+ *** Parameters: ***
3
+ {:on_error=>:warning}
4
+ *** Markdown input: ***
5
+ Hello: ! \! \` \{ \} \[ \] \( \) \# \. \! * \* *
6
+
7
+
8
+ Ora, *emphasis*, **bold**, * <- due asterischi-> * , un underscore-> _ , _emphasis_,
9
+ incre*dible*e!
10
+
11
+ This is ``Code with a special: -> ` <- ``(after)
12
+
13
+ `Start ` of paragraph
14
+
15
+ End of `paragraph `
16
+ *** Output of inspect ***
17
+ md_el(:document,[
18
+ md_par(["Hello: ! ! ` { } [ ] ( ) # . ! * * *"]),
19
+ md_par([
20
+ "Ora, ",
21
+ md_em(["emphasis"]),
22
+ ", ",
23
+ md_strong(["bold"]),
24
+ ", * <- due asterischi-> * , un underscore-> _ , ",
25
+ md_em(["emphasis"]),
26
+ ", incre",
27
+ md_em(["dible"]),
28
+ "e!"
29
+ ]),
30
+ md_par(["This is ", md_code("Code with a special: -> ` <-"), "(after)"]),
31
+ md_par([md_code("Start "), " of paragraph"]),
32
+ md_par(["End of ", md_code("paragraph ")])
33
+ ],{},[])
34
+ *** Output of to_html ***
35
+ <p>Hello: ! ! ` { } [ ] ( ) # . ! * * *</p>
36
+
37
+ <p>Ora, <em>emphasis</em>, <strong>bold</strong>, * &lt;- due asterischi-&gt; * , un underscore-&gt; _ , <em>emphasis</em>, incre<em>dible</em>e!</p>
38
+
39
+ <p>This is <code>Code with a special: -&gt; ` &lt;-</code>(after)</p>
40
+
41
+ <p><code>Start </code> of paragraph</p>
42
+
43
+ <p>End of <code>paragraph </code></p>
44
+ *** Output of to_latex ***
45
+ Hello: ! ! ` \{ \} [ ] ( ) \# . ! * * *
46
+
47
+ Ora, \emph{emphasis}, \textbf{bold}, * {\tt \char60}- due asterischi-{\tt \char62} * , un underscore-{\tt \char62} \_ , \emph{emphasis}, incre\emph{dible}e!
48
+
49
+ This is {\colorbox[rgb]{1.00,0.93,1.00}{\tt Code~with~a~special\char58~\char45\char62~\char96~\char60\char45}}(after)
50
+
51
+ {\colorbox[rgb]{1.00,0.93,1.00}{\tt Start~}} of paragraph
52
+
53
+ End of {\colorbox[rgb]{1.00,0.93,1.00}{\tt paragraph~}}
54
+ *** Output of to_md ***
55
+ Hello: ! ! ` { } [ ] ( ) # . ! * * *
56
+
57
+ Ora, emphasis, bold, * <- due
58
+ asterischi-> * , un underscore-> _ ,
59
+ emphasis, incre diblee!
60
+
61
+ This is (after)
62
+
63
+ of paragraph
64
+
65
+ End of
66
+ *** Output of to_s ***
67
+ Hello: ! ! ` { } [ ] ( ) # . ! * * *Ora, emphasis, bold, * <- due asterischi-> * , un underscore-> _ , emphasis, incrediblee!This is (after) of paragraphEnd of
@@ -0,0 +1,52 @@
1
+ Write a comment abouth the test here.
2
+ *** Parameters: ***
3
+ {:css=>"style.css"}
4
+ *** Markdown input: ***
5
+ CSS: style.css
6
+
7
+
8
+ Apple
9
+ : Pomaceous fruit of plants of the genus Malus in
10
+ the family Rosaceae.
11
+
12
+ Orange
13
+ : The fruit of an evergreen tree of the genus Citrus.
14
+
15
+ *** Output of inspect ***
16
+ md_el(:document,[
17
+ md_el(:definition_list,[
18
+ md_el(:definition,[
19
+ md_el(:definition_term,["Apple"],{},[]),
20
+ md_el(:definition_data,[
21
+ "Pomaceous fruit of plants of the genus Malus in the family Rosaceae."
22
+ ],{},[])
23
+ ],{:definitions=>[md_el(:definition_data,[
24
+ "Pomaceous fruit of plants of the genus Malus in the family Rosaceae."
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
+ *** Output of to_html ***
33
+ <dl>
34
+ <dt>Apple</dt>
35
+
36
+ <dd>Pomaceous fruit of plants of the genus Malus in the family Rosaceae.</dd>
37
+
38
+ <dt>Orange</dt>
39
+
40
+ <dd>The fruit of an evergreen tree of the genus Citrus.</dd>
41
+ </dl>
42
+ *** Output of to_latex ***
43
+ \begin{description}
44
+
45
+ \item[Apple] Pomaceous fruit of plants of the genus Malus in the family Rosaceae.
46
+
47
+ \item[Orange] The fruit of an evergreen tree of the genus Citrus.
48
+ \end{description}
49
+ *** Output of to_md ***
50
+ ApplePomaceous fruit of plants of the genus Malus in the family Rosaceae.OrangeThe fruit of an evergreen tree of the genus Citrus.
51
+ *** Output of to_s ***
52
+ ApplePomaceous fruit of plants of the genus Malus in the family Rosaceae.OrangeThe fruit of an evergreen tree of the genus Citrus.
@@ -0,0 +1,63 @@
1
+ Write a comment abouth the test here.
2
+ *** Parameters: ***
3
+ {:title=>"Header 1"}
4
+ *** Markdown input: ***
5
+ Header 1 {#header1}
6
+ ========
7
+
8
+ Header 2 {#header2}
9
+ --------
10
+
11
+ ### Header 3 ### {#header3}
12
+
13
+ Then you can create links to different parts of the same document like this:
14
+
15
+ [Link back to header 1](#header1),
16
+ [Link back to header 2](#header2),
17
+ [Link back to header 3](#header3)
18
+
19
+ *** Output of inspect ***
20
+ md_el(:document,[
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
+ "Then you can create links to different parts of the same document like this:"
26
+ ]),
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
+ ])
34
+ ],{},[])
35
+ *** Output of to_html ***
36
+ <h1 id='header1'>Header 1</h1>
37
+
38
+ <h2 id='header2'>Header 2</h2>
39
+
40
+ <h3 id='header3'>Header 3</h3>
41
+
42
+ <p>Then you can create links to different parts of the same document like this:</p>
43
+
44
+ <p><a href='#header1'>Link back to header 1</a>, <a href='#header2'>Link back to header 2</a>, <a href='#header3'>Link back to header 3</a></p>
45
+ *** Output of to_latex ***
46
+ \hypertarget{header1}{}\section*{{Header 1}}\label{header1}
47
+
48
+ \hypertarget{header2}{}\subsection*{{Header 2}}\label{header2}
49
+
50
+ \hypertarget{header3}{}\subsubsection*{{Header 3}}\label{header3}
51
+
52
+ Then you can create links to different parts of the same document like this:
53
+
54
+ \hyperlink{header1}{Link back to header 1}, \hyperlink{header2}{Link back to header 2}, \hyperlink{header3}{Link back to header 3}
55
+ *** Output of to_md ***
56
+ Header 1Header 2Header 3Then you can create links to different
57
+ parts of the same document like this:
58
+
59
+ Link back to header 1,
60
+ Link back to header 2,
61
+ Link back to header 3
62
+ *** Output of to_s ***
63
+ 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
@@ -0,0 +1,37 @@
1
+ Write a comment abouth the test here.
2
+ *** Parameters: ***
3
+ {:css=>"style.css"}
4
+ *** Markdown input: ***
5
+ CSS: style.css
6
+
7
+ First Header | Second Header
8
+ ------------- | -------------
9
+ Content Cell | Content Cell
10
+ Content Cell | Content Cell
11
+
12
+ *** Output of inspect ***
13
+ md_el(:document,[
14
+ md_el(:table,[
15
+ md_el(:head_cell,["First Header"],{},[]),
16
+ md_el(:head_cell,["Second Header"],{},[]),
17
+ md_el(:cell,["Content Cell"],{},[]),
18
+ md_el(:cell,["Content Cell"],{},[]),
19
+ md_el(:cell,["Content Cell"],{},[]),
20
+ md_el(:cell,["Content Cell"],{},[])
21
+ ],{:align=>[:left, :left]},[])
22
+ ],{},[])
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>
25
+ </tr><tr><td style='text-align: left;'>Content Cell</td><td style='text-align: left;'>Content Cell</td>
26
+ </tr></tbody></table>
27
+ *** Output of to_latex ***
28
+ \begin{tabular}{l|l}
29
+ First Header&Second Header\\
30
+ \hline
31
+ Content Cell&Content Cell\\
32
+ Content Cell&Content Cell\\
33
+ \end{tabular}
34
+ *** Output of to_md ***
35
+ First HeaderSecond HeaderContent CellContent CellContent CellContent Cell
36
+ *** Output of to_s ***
37
+ First HeaderSecond HeaderContent CellContent CellContent CellContent Cell
@@ -0,0 +1,97 @@
1
+ Write a comment abouth the test here.
2
+ *** Parameters: ***
3
+ {:footnotes_used=>["^b", "^c", "^a"]}
4
+ *** Markdown input: ***
5
+ That's some text with a footnote [^b] and another [^c] and another [^a].
6
+
7
+ [^a]: And that's the footnote.
8
+
9
+ That's the second paragraph of the footnote.
10
+
11
+
12
+ [^b]: And that's the footnote.
13
+ This is second sentence (same paragraph).
14
+
15
+ [^c]:
16
+ This is the very long one.
17
+
18
+ That's the second paragraph.
19
+
20
+
21
+ This is not a footnote.
22
+ *** Output of inspect ***
23
+ md_el(:document,[
24
+ md_par([
25
+ "That",
26
+ md_entity("rsquo"),
27
+ "s some text with a footnote ",
28
+ md_foot_ref("^b"),
29
+ " and another ",
30
+ md_foot_ref("^c"),
31
+ " and another ",
32
+ md_foot_ref("^a"),
33
+ "."
34
+ ]),
35
+ md_el(:footnote,[
36
+ md_par(["And that", md_entity("rsquo"), "s the footnote."]),
37
+ md_par([
38
+ "That",
39
+ md_entity("rsquo"),
40
+ "s the second paragraph of the footnote."
41
+ ])
42
+ ],{:footnote_id=>"^a"},[]),
43
+ md_el(:footnote,[
44
+ md_par([
45
+ "And that",
46
+ md_entity("rsquo"),
47
+ "s the footnote. This is second sentence (same paragraph)."
48
+ ])
49
+ ],{:footnote_id=>"^b"},[]),
50
+ md_el(:footnote,[
51
+ md_par(["This is the very long one."]),
52
+ md_par(["That", md_entity("rsquo"), "s the second paragraph."])
53
+ ],{:footnote_id=>"^c"},[]),
54
+ md_par(["This is not a footnote."])
55
+ ],{},[])
56
+ *** Output of to_html ***
57
+ <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>
58
+
59
+ <p>This is not a footnote.</p>
60
+ <div class='footnotes'><hr /><ol><li id='fn:1'>
61
+ <p>And that&#8217;s the footnote. This is second sentence (same paragraph).</p>
62
+ <a href='#fnref:1' rev='footnote'>&#8617;</a></li><li id='fn:2'>
63
+ <p>This is the very long one.</p>
64
+
65
+ <p>That&#8217;s the second paragraph.</p>
66
+ <a href='#fnref:2' rev='footnote'>&#8617;</a></li><li id='fn:3'>
67
+ <p>And that&#8217;s the footnote.</p>
68
+
69
+ <p>That&#8217;s the second paragraph of the footnote.</p>
70
+ <a href='#fnref:3' rev='footnote'>&#8617;</a></li></ol></div>
71
+ *** Output of to_latex ***
72
+ 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.
73
+
74
+ That'{}s the second paragraph.} and another \footnote{And that'{}s the footnote.
75
+
76
+ That'{}s the second paragraph of the footnote.} .
77
+
78
+ This is not a footnote.
79
+ *** Output of to_md ***
80
+ That s some text with a footnote and
81
+ another and another .
82
+
83
+ And that s the footnote.
84
+
85
+ That s the second paragraph of the
86
+ footnote.
87
+
88
+ And that s the footnote. This is second
89
+ sentence (same paragraph).
90
+
91
+ This is the very long one.
92
+
93
+ That s the second paragraph.
94
+
95
+ This is not a footnote.
96
+ *** Output of to_s ***
97
+ Thats some text with a footnote and another and another .And thats the footnote.Thats the second paragraph of the footnote.And thats the footnote. This is second sentence (same paragraph).This is the very long one.Thats the second paragraph.This is not a footnote.
@@ -0,0 +1,37 @@
1
+ Write a comment abouth the test here.
2
+ *** Parameters: ***
3
+ {:title=>"A title with emphasis"}
4
+ *** Markdown input: ***
5
+ A title with *emphasis*
6
+ =======================
7
+
8
+ A title with *emphasis*
9
+ -----------------------
10
+
11
+
12
+ #### A title with *emphasis* ####
13
+
14
+
15
+
16
+ *** Output of inspect ***
17
+ md_el(:document,[
18
+ md_el(:header,["A title with ", md_em(["emphasis"])],{:level=>1},[]),
19
+ md_el(:header,["A title with ", md_em(["emphasis"])],{:level=>2},[]),
20
+ md_el(:header,["A title with ", md_em(["emphasis"])],{:level=>4},[])
21
+ ],{},[])
22
+ *** Output of to_html ***
23
+ <h1 id='a_title_with_emphasis'>A title with <em>emphasis</em></h1>
24
+
25
+ <h2 id='a_title_with_emphasis'>A title with <em>emphasis</em></h2>
26
+
27
+ <h4 id='a_title_with_emphasis'>A title with <em>emphasis</em></h4>
28
+ *** Output of to_latex ***
29
+ \hypertarget{a_title_with_emphasis}{}\section*{{A title with \emph{emphasis}}}\label{a_title_with_emphasis}
30
+
31
+ \hypertarget{a_title_with_emphasis}{}\subsection*{{A title with \emph{emphasis}}}\label{a_title_with_emphasis}
32
+
33
+ \hypertarget{a_title_with_emphasis}{}\paragraph*{{A title with \emph{emphasis}}}\label{a_title_with_emphasis}
34
+ *** Output of to_md ***
35
+ A title with emphasisA title with emphasisA title with emphasis
36
+ *** Output of to_s ***
37
+ A title with emphasisA title with emphasisA title with emphasis