maruku 0.5.3 → 0.5.4

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.
Files changed (51) hide show
  1. data/bin/maruku +14 -6
  2. data/bin/marutest +19 -10
  3. data/docs/changelog.html +49 -8
  4. data/docs/changelog.md +26 -1
  5. data/docs/entity_test.html +1 -1
  6. data/docs/exd.html +43 -24
  7. data/docs/index.html +4 -6
  8. data/docs/markdown_syntax.html +81 -170
  9. data/docs/maruku.html +4 -6
  10. data/docs/maruku.md +1 -1
  11. data/docs/proposal.html +21 -41
  12. data/lib/maruku.rb +5 -0
  13. data/lib/maruku/attributes.rb +3 -2
  14. data/lib/maruku/defaults.rb +3 -1
  15. data/lib/maruku/ext/math.rb +30 -0
  16. data/lib/maruku/ext/math/elements.rb +3 -2
  17. data/lib/maruku/ext/math/parsing.rb +81 -58
  18. data/lib/maruku/ext/math/to_html.rb +5 -5
  19. data/lib/maruku/helpers.rb +2 -0
  20. data/lib/maruku/input/charsource.rb +1 -1
  21. data/lib/maruku/input/extensions.rb +6 -5
  22. data/lib/maruku/input/parse_block.rb +7 -8
  23. data/lib/maruku/input/parse_doc.rb +1 -1
  24. data/lib/maruku/input/parse_span_better.rb +4 -4
  25. data/lib/maruku/input_textile2/t2_parser.rb +163 -0
  26. data/lib/maruku/maruku.rb +1 -1
  27. data/lib/maruku/output/s5/fancy.rb +756 -0
  28. data/lib/maruku/output/s5/to_s5.rb +104 -0
  29. data/lib/maruku/output/to_html.rb +103 -49
  30. data/lib/maruku/string_utils.rb +1 -1
  31. data/lib/maruku/textile2.rb +1 -0
  32. data/lib/maruku/version.rb +3 -1
  33. data/maruku_gem.rb +33 -0
  34. data/tests/s5/s5profiling.md +48 -0
  35. data/tests/unittest/blanks_in_code.md +6 -12
  36. data/tests/unittest/code3.md +3 -5
  37. data/tests/unittest/data_loss.md +53 -0
  38. data/tests/unittest/email.md +2 -2
  39. data/tests/unittest/entities.md +3 -5
  40. data/tests/unittest/footnotes.md +5 -5
  41. data/tests/unittest/ie.md +1 -1
  42. data/tests/unittest/images.md +2 -2
  43. data/tests/unittest/inline_html.md +6 -10
  44. data/tests/unittest/links.md +1 -1
  45. data/tests/unittest/list2.md +5 -5
  46. data/tests/unittest/lists.md +13 -13
  47. data/tests/unittest/lists_ol.md +13 -13
  48. data/tests/unittest/math/math2.md +84 -0
  49. data/tests/unittest/math/notmath.md +48 -0
  50. data/tests/unittest/syntax_hl.md +3 -5
  51. metadata +11 -2
@@ -0,0 +1,84 @@
1
+
2
+ *** Parameters: ***
3
+ require 'maruku/ext/math'
4
+ {:math_numbered => ['\\['], :html_math_engine => 'itex2mml' }
5
+ *** Markdown input: ***
6
+
7
+ \[
8
+ \alpha
9
+ \]
10
+
11
+ \begin{equation}
12
+ \alpha
13
+ \end{equation}
14
+
15
+ \begin{equation} \beta
16
+ \end{equation}
17
+
18
+
19
+ \begin{equation} \gamma \end{equation}
20
+ *** Output of inspect ***
21
+ md_el(:document,[
22
+ md_el(:equation,[],{:label=>"eq1",:math=>"\t\\alpha\n\n",:num=>1},[]),
23
+ md_el(:equation,[],{:label=>nil,:math=>"\t\\alpha\n\n",:num=>nil},[]),
24
+ md_el(:equation,[],{:label=>nil,:math=>" \\beta\n",:num=>nil},[]),
25
+ md_el(:equation,[],{:label=>nil,:math=>" \\gamma ",:num=>nil},[])
26
+ ],{},[])
27
+ *** Output of to_html ***
28
+ <div class='maruku-equation' id='eq:eq1'><span class='maruku-eq-number'>(1)</span><math class='maruku-mathml' display='block' xmlns='http://www.w3.org/1998/Math/MathML'><mi>&alpha;</mi></math><div class='maruku-eq-tex'><code style='display: none'> \alpha
29
+
30
+ </code></div></div><div class='maruku-equation'><math class='maruku-mathml' display='block' xmlns='http://www.w3.org/1998/Math/MathML'><mi>&alpha;</mi></math><div class='maruku-eq-tex'><code style='display: none'> \alpha
31
+
32
+ </code></div></div><div class='maruku-equation'><math class='maruku-mathml' display='block' xmlns='http://www.w3.org/1998/Math/MathML'><mi>&beta;</mi></math><div class='maruku-eq-tex'><code style='display: none'> \beta
33
+ </code></div></div><div class='maruku-equation'><math class='maruku-mathml' display='block' xmlns='http://www.w3.org/1998/Math/MathML'><mi>&gamma;</mi></math><div class='maruku-eq-tex'><code style='display: none'> \gamma </code></div></div>
34
+ *** Output of to_latex ***
35
+ \begin{equation}
36
+ \alpha
37
+ \label{eq1}\end{equation}
38
+ \begin{displaymath}
39
+ \alpha
40
+ \end{displaymath}
41
+ \begin{displaymath}
42
+ \beta
43
+ \end{displaymath}
44
+ \begin{displaymath}
45
+ \gamma
46
+ \end{displaymath}
47
+
48
+ *** Output of to_md ***
49
+
50
+ *** Output of to_s ***
51
+
52
+ *** EOF ***
53
+
54
+
55
+
56
+ OK!
57
+
58
+
59
+
60
+ *** Output of Markdown.pl ***
61
+ <p>[
62
+ \alpha
63
+ ]</p>
64
+
65
+ <p>\begin{equation}
66
+ \alpha
67
+ \end{equation}</p>
68
+
69
+ <p>\begin{equation} \beta
70
+ \end{equation}</p>
71
+
72
+ <p>\begin{equation} \gamma \end{equation}</p>
73
+
74
+ *** Output of Markdown.pl (parsed) ***
75
+ <p>[
76
+ \alpha
77
+ ]</p
78
+ ><p>\begin{equation}
79
+ \alpha
80
+ \end{equation}</p
81
+ ><p>\begin{equation} \beta
82
+ \end{equation}</p
83
+ ><p>\begin{equation} \gamma \end{equation}</p
84
+ >
@@ -0,0 +1,48 @@
1
+
2
+ *** Parameters: ***
3
+ require 'maruku/ext/math'; {:math_enabled => false}
4
+ *** Markdown input: ***
5
+
6
+ This is not $math$.
7
+
8
+ \[ \alpha \]
9
+
10
+ *** Output of inspect ***
11
+ md_el(:document,[md_par(["This is not $math$."]), md_par(["[ \\alpha ]"])],{},[])
12
+ *** Output of to_html ***
13
+
14
+ <p>This is not $math$.</p>
15
+
16
+ <p>[ \alpha ]</p>
17
+
18
+ *** Output of to_latex ***
19
+ This is not \$math\$.
20
+
21
+ [ $\backslash$alpha ]
22
+
23
+
24
+ *** Output of to_md ***
25
+ This is not $math$.
26
+
27
+ [ \alpha ]
28
+
29
+
30
+ *** Output of to_s ***
31
+ This is not $math$.[ \alpha ]
32
+ *** EOF ***
33
+
34
+
35
+
36
+ OK!
37
+
38
+
39
+
40
+ *** Output of Markdown.pl ***
41
+ <p>This is not $math$.</p>
42
+
43
+ <p>[ \alpha ]</p>
44
+
45
+ *** Output of Markdown.pl (parsed) ***
46
+ <p>This is not $math$.</p
47
+ ><p>[ \alpha ]</p
48
+ >
@@ -17,7 +17,7 @@ This is ruby code:
17
17
  *** Output of inspect ***
18
18
  md_el(:document,[
19
19
  md_par(["This is ruby code:"]),
20
- md_el(:code,[],{:raw_code=>"require 'maruku'\n\nputs Maruku.new($stdin).to_html\n"},[]),
20
+ md_el(:code,[],{:raw_code=>"require 'maruku'\n\nputs Maruku.new($stdin).to_html"},[]),
21
21
  md_par(["This is ruby code:"]),
22
22
  md_el(:code,[],{:raw_code=>"require 'maruku'"},[["lang", "ruby"], [:ref, "html_use_syntax"]]),
23
23
  md_el(:code,[],{:raw_code=>"puts Maruku.new($stdin).to_html"},[])
@@ -28,8 +28,7 @@ md_el(:document,[
28
28
 
29
29
  <pre><code>require &#39;maruku&#39;
30
30
 
31
- puts Maruku.new($stdin).to_html
32
- </code></pre>
31
+ puts Maruku.new($stdin).to_html</code></pre>
33
32
 
34
33
  <p>This is ruby code:</p>
35
34
 
@@ -42,8 +41,7 @@ This is ruby code:
42
41
 
43
42
  \begin{verbatim}require 'maruku'
44
43
 
45
- puts Maruku.new($stdin).to_html
46
- \end{verbatim}
44
+ puts Maruku.new($stdin).to_html\end{verbatim}
47
45
  This is ruby code:
48
46
 
49
47
  \begin{verbatim}require 'maruku'\end{verbatim}
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.10
3
3
  specification_version: 1
4
4
  name: maruku
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.5.3
7
- date: 2007-02-05
6
+ version: 0.5.4
7
+ date: 2007-02-18
8
8
  summary: Maruku is a Markdown-superset interpreter written in Ruby.
9
9
  require_paths:
10
10
  - lib
@@ -38,6 +38,7 @@ files:
38
38
  - lib/maruku/structures.rb
39
39
  - lib/maruku/structures_inspect.rb
40
40
  - lib/maruku/structures_iterators.rb
41
+ - lib/maruku/textile2.rb
41
42
  - lib/maruku/toc.rb
42
43
  - lib/maruku/version.rb
43
44
  - lib/maruku/ext/math.rb
@@ -67,12 +68,15 @@ files:
67
68
  - lib/maruku/input/parse_span_better.rb
68
69
  - lib/maruku/input/rubypants.rb
69
70
  - lib/maruku/input/type_detection.rb
71
+ - lib/maruku/input_textile2/t2_parser.rb
70
72
  - lib/maruku/output/to_html.rb
71
73
  - lib/maruku/output/to_latex.rb
72
74
  - lib/maruku/output/to_latex_entities.rb
73
75
  - lib/maruku/output/to_latex_strings.rb
74
76
  - lib/maruku/output/to_markdown.rb
75
77
  - lib/maruku/output/to_s.rb
78
+ - lib/maruku/output/s5/fancy.rb
79
+ - lib/maruku/output/s5/to_s5.rb
76
80
  - lib/maruku/tests/benchmark.rb
77
81
  - lib/maruku/tests/new_parser.rb
78
82
  - lib/maruku/tests/tests.rb
@@ -124,6 +128,7 @@ files:
124
128
  - tests/others/paragraphs.md
125
129
  - tests/others/sss06.md
126
130
  - tests/others/test.md
131
+ - tests/s5/s5profiling.md
127
132
  - tests/unittest/abbreviations.md
128
133
  - tests/unittest/blank.md
129
134
  - tests/unittest/blanks_in_code.md
@@ -132,6 +137,7 @@ files:
132
137
  - tests/unittest/code.md
133
138
  - tests/unittest/code2.md
134
139
  - tests/unittest/code3.md
140
+ - tests/unittest/data_loss.md
135
141
  - tests/unittest/easy.md
136
142
  - tests/unittest/email.md
137
143
  - tests/unittest/entities.md
@@ -180,6 +186,8 @@ files:
180
186
  - tests/unittest/encoding/utf-8.md
181
187
  - tests/unittest/math/equations.md
182
188
  - tests/unittest/math/inline.md
189
+ - tests/unittest/math/math2.md
190
+ - tests/unittest/math/notmath.md
183
191
  - tests/unittest/math/table.md
184
192
  - tests/unittest/math/table2.md
185
193
  - tests/unittest/notyet/escape.md
@@ -197,6 +205,7 @@ files:
197
205
  - bin/marutest
198
206
  - bin/marutex
199
207
  - Rakefile
208
+ - maruku_gem.rb
200
209
  test_files: []
201
210
  rdoc_options: []
202
211
  extra_rdoc_files: []