maruku 0.6.1 → 0.7.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (263) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/MIT-LICENSE.txt +20 -0
  5. data/bin/maruku +153 -152
  6. data/bin/marutex +2 -29
  7. data/data/entities.xml +261 -0
  8. data/docs/math.md +14 -18
  9. data/lib/maruku.rb +65 -77
  10. data/lib/maruku/attributes.rb +109 -214
  11. data/lib/maruku/defaults.rb +45 -67
  12. data/lib/maruku/document.rb +43 -0
  13. data/lib/maruku/element.rb +112 -0
  14. data/lib/maruku/errors.rb +71 -0
  15. data/lib/maruku/ext/div.rb +105 -113
  16. data/lib/maruku/ext/fenced_code.rb +97 -0
  17. data/lib/maruku/ext/math.rb +22 -26
  18. data/lib/maruku/ext/math/elements.rb +20 -26
  19. data/lib/maruku/ext/math/mathml_engines/blahtex.rb +92 -104
  20. data/lib/maruku/ext/math/mathml_engines/itex2mml.rb +33 -26
  21. data/lib/maruku/ext/math/mathml_engines/none.rb +11 -19
  22. data/lib/maruku/ext/math/mathml_engines/ritex.rb +2 -4
  23. data/lib/maruku/ext/math/parsing.rb +107 -113
  24. data/lib/maruku/ext/math/to_html.rb +184 -187
  25. data/lib/maruku/ext/math/to_latex.rb +30 -21
  26. data/lib/maruku/helpers.rb +158 -257
  27. data/lib/maruku/html.rb +254 -0
  28. data/lib/maruku/input/charsource.rb +272 -319
  29. data/lib/maruku/input/extensions.rb +62 -63
  30. data/lib/maruku/input/html_helper.rb +220 -189
  31. data/lib/maruku/input/linesource.rb +90 -110
  32. data/lib/maruku/input/mdline.rb +129 -0
  33. data/lib/maruku/input/parse_block.rb +618 -612
  34. data/lib/maruku/input/parse_doc.rb +145 -215
  35. data/lib/maruku/input/parse_span.rb +658 -0
  36. data/lib/maruku/input/rubypants.rb +200 -128
  37. data/lib/maruku/inspect_element.rb +60 -0
  38. data/lib/maruku/maruku.rb +10 -31
  39. data/lib/maruku/output/entity_table.rb +33 -0
  40. data/lib/maruku/output/s5/fancy.rb +462 -462
  41. data/lib/maruku/output/s5/to_s5.rb +115 -135
  42. data/lib/maruku/output/to_html.rb +898 -983
  43. data/lib/maruku/output/to_latex.rb +561 -560
  44. data/lib/maruku/output/to_markdown.rb +207 -162
  45. data/lib/maruku/output/to_s.rb +11 -52
  46. data/lib/maruku/string_utils.rb +129 -179
  47. data/lib/maruku/toc.rb +185 -196
  48. data/lib/maruku/version.rb +33 -38
  49. data/spec/block_docs/abbrev.md +776 -0
  50. data/{tests/unittest → spec/block_docs}/abbreviations.md +11 -20
  51. data/{tests/unittest → spec/block_docs}/alt.md +2 -14
  52. data/{tests/unittest/pending → spec/block_docs}/amps.md +1 -13
  53. data/{tests/unittest → spec/block_docs}/attributes/att2.md +0 -12
  54. data/{tests/unittest → spec/block_docs}/attributes/att3.md +2 -14
  55. data/{tests/unittest → spec/block_docs}/attributes/attributes.md +12 -16
  56. data/{tests/unittest → spec/block_docs}/attributes/circular.md +0 -12
  57. data/{tests/unittest → spec/block_docs}/attributes/default.md +1 -13
  58. data/{tests/unittest → spec/block_docs}/blank.md +0 -12
  59. data/{tests/unittest → spec/block_docs}/blanks_in_code.md +16 -15
  60. data/{tests/unittest/loss.md → spec/block_docs/bug_def.md} +6 -18
  61. data/{tests/unittest → spec/block_docs}/bug_table.md +3 -15
  62. data/{tests/unittest → spec/block_docs}/code.md +7 -14
  63. data/{tests/unittest → spec/block_docs}/code2.md +4 -14
  64. data/{tests/unittest → spec/block_docs}/code3.md +12 -16
  65. data/{tests/unittest → spec/block_docs}/data_loss.md +2 -14
  66. data/{tests/unittest → spec/block_docs}/divs/div1.md +0 -12
  67. data/{tests/unittest → spec/block_docs}/divs/div2.md +0 -12
  68. data/{tests/unittest → spec/block_docs}/divs/div3_nest.md +3 -15
  69. data/{tests/unittest → spec/block_docs}/easy.md +1 -13
  70. data/spec/block_docs/email.md +29 -0
  71. data/{tests/unittest/pending → spec/block_docs}/empty_cells.md +3 -15
  72. data/{tests/unittest → spec/block_docs}/encoding/iso-8859-1.md +1 -14
  73. data/{tests/unittest → spec/block_docs}/encoding/utf-8.md +0 -12
  74. data/{tests/unittest → spec/block_docs}/entities.md +27 -29
  75. data/{tests/unittest/notyet → spec/block_docs}/escape.md +2 -14
  76. data/{tests/unittest → spec/block_docs}/escaping.md +11 -22
  77. data/{tests/unittest → spec/block_docs}/extra_dl.md +2 -13
  78. data/{tests/unittest → spec/block_docs}/extra_header_id.md +14 -20
  79. data/{tests/unittest → spec/block_docs}/extra_table1.md +3 -15
  80. data/spec/block_docs/fenced_code_blocks.md +66 -0
  81. data/spec/block_docs/fenced_code_blocks_highlighted.md +18 -0
  82. data/{tests/unittest → spec/block_docs}/footnotes.md +12 -24
  83. data/spec/block_docs/footnotes2.md +78 -0
  84. data/spec/block_docs/hard.md +25 -0
  85. data/spec/block_docs/header_after_par.md +62 -0
  86. data/{tests/unittest → spec/block_docs}/headers.md +10 -18
  87. data/{tests/unittest → spec/block_docs}/hex_entities.md +7 -18
  88. data/{tests/unittest → spec/block_docs}/hrule.md +5 -12
  89. data/{tests/unittest → spec/block_docs}/html3.md +1 -13
  90. data/{tests/unittest → spec/block_docs}/html4.md +2 -14
  91. data/{tests/unittest → spec/block_docs}/html5.md +2 -14
  92. data/spec/block_docs/html_block_in_para.md +22 -0
  93. data/spec/block_docs/html_inline.md +25 -0
  94. data/spec/block_docs/html_trailing.md +31 -0
  95. data/spec/block_docs/ie.md +62 -0
  96. data/spec/block_docs/iframe.md +29 -0
  97. data/{tests/unittest → spec/block_docs}/images.md +22 -28
  98. data/{tests/unittest → spec/block_docs}/images2.md +7 -17
  99. data/{tests/unittest → spec/block_docs}/inline_html.md +37 -67
  100. data/{tests/unittest → spec/block_docs}/inline_html2.md +1 -13
  101. data/spec/block_docs/inline_html_beginning.md +10 -0
  102. data/spec/block_docs/issue20.md +9 -0
  103. data/spec/block_docs/issue26.md +22 -0
  104. data/spec/block_docs/issue29.md +9 -0
  105. data/spec/block_docs/issue30.md +30 -0
  106. data/spec/block_docs/issue31.md +25 -0
  107. data/spec/block_docs/issue40.md +40 -0
  108. data/spec/block_docs/issue64.md +55 -0
  109. data/spec/block_docs/issue67.md +19 -0
  110. data/spec/block_docs/issue70.md +11 -0
  111. data/spec/block_docs/issue72.md +17 -0
  112. data/spec/block_docs/issue74.md +38 -0
  113. data/spec/block_docs/issue79.md +15 -0
  114. data/spec/block_docs/issue83.md +13 -0
  115. data/spec/block_docs/issue85.md +25 -0
  116. data/spec/block_docs/issue88.md +19 -0
  117. data/spec/block_docs/issue89.md +12 -0
  118. data/spec/block_docs/issue90.md +38 -0
  119. data/{tests/unittest/pending → spec/block_docs}/link.md +21 -18
  120. data/{tests/unittest → spec/block_docs}/links.md +33 -32
  121. data/spec/block_docs/links2.md +21 -0
  122. data/{tests/unittest → spec/block_docs}/list1.md +0 -12
  123. data/{tests/unittest → spec/block_docs}/list12.md +2 -14
  124. data/{tests/unittest → spec/block_docs}/list2.md +2 -14
  125. data/spec/block_docs/list_multipara.md +42 -0
  126. data/{tests/unittest → spec/block_docs}/lists.md +28 -29
  127. data/{tests/unittest → spec/block_docs}/lists10.md +2 -14
  128. data/spec/block_docs/lists11.md +23 -0
  129. data/spec/block_docs/lists12.md +43 -0
  130. data/spec/block_docs/lists13.md +55 -0
  131. data/spec/block_docs/lists14.md +61 -0
  132. data/spec/block_docs/lists15.md +36 -0
  133. data/spec/block_docs/lists6.md +88 -0
  134. data/spec/block_docs/lists7b.md +58 -0
  135. data/spec/block_docs/lists9.md +53 -0
  136. data/{tests/unittest → spec/block_docs}/lists_after_paragraph.md +19 -25
  137. data/spec/block_docs/lists_blank.md +35 -0
  138. data/{tests/unittest/list3.md → spec/block_docs/lists_blockquote_code.md} +2 -14
  139. data/{tests/unittest/list4.md → spec/block_docs/lists_need_blank_line.md} +50 -21
  140. data/spec/block_docs/lists_nested.md +44 -0
  141. data/spec/block_docs/lists_nested_blankline.md +28 -0
  142. data/spec/block_docs/lists_nested_deep.md +43 -0
  143. data/{tests/unittest → spec/block_docs}/lists_ol.md +37 -54
  144. data/spec/block_docs/lists_paraindent.md +47 -0
  145. data/spec/block_docs/lists_tab.md +54 -0
  146. data/spec/block_docs/loss.md +17 -0
  147. data/spec/block_docs/math-blahtex/equations.md +30 -0
  148. data/spec/block_docs/math-blahtex/inline.md +48 -0
  149. data/spec/block_docs/math-blahtex/math2.md +45 -0
  150. data/spec/block_docs/math-blahtex/table.md +25 -0
  151. data/spec/block_docs/math/embedded_invalid_svg.md +79 -0
  152. data/spec/block_docs/math/embedded_svg.md +97 -0
  153. data/spec/block_docs/math/equations.md +44 -0
  154. data/{tests/unittest → spec/block_docs}/math/inline.md +7 -19
  155. data/spec/block_docs/math/math2.md +45 -0
  156. data/{tests/unittest → spec/block_docs}/math/notmath.md +0 -12
  157. data/spec/block_docs/math/raw_mathml.md +87 -0
  158. data/spec/block_docs/math/table.md +25 -0
  159. data/{tests/unittest → spec/block_docs}/math/table2.md +5 -17
  160. data/{tests/unittest → spec/block_docs}/misc_sw.md +181 -118
  161. data/{tests/unittest → spec/block_docs}/olist.md +6 -18
  162. data/{tests/unittest → spec/block_docs}/one.md +0 -12
  163. data/{tests/unittest → spec/block_docs}/paragraph.md +0 -12
  164. data/{tests/unittest → spec/block_docs}/paragraph_rules/dont_merge_ref.md +4 -12
  165. data/{tests/unittest → spec/block_docs}/paragraph_rules/tab_is_blank.md +0 -12
  166. data/{tests/unittest → spec/block_docs}/paragraphs.md +1 -13
  167. data/{tests/unittest → spec/block_docs}/recover/recover_links.md +4 -16
  168. data/{tests/unittest/pending/ref.md → spec/block_docs/ref_with_period.md} +7 -16
  169. data/spec/block_docs/ref_with_title.md +22 -0
  170. data/{tests/unittest → spec/block_docs}/references/long_example.md +16 -23
  171. data/{tests/unittest → spec/block_docs}/references/spaces_and_numbers.md +0 -12
  172. data/{tests/unittest → spec/block_docs}/smartypants.md +24 -31
  173. data/{tests/unittest → spec/block_docs}/syntax_hl.md +13 -17
  174. data/{tests/unittest → spec/block_docs}/table_attributes.md +2 -14
  175. data/spec/block_docs/tables.md +58 -0
  176. data/{tests/unittest → spec/block_docs}/test.md +1 -13
  177. data/{tests/unittest/notyet → spec/block_docs}/ticks.md +1 -13
  178. data/spec/block_docs/toc.md +87 -0
  179. data/{tests/unittest/notyet → spec/block_docs}/triggering.md +14 -25
  180. data/{tests/unittest → spec/block_docs}/underscore_in_words.md +0 -12
  181. data/{tests/unittest → spec/block_docs}/wrapping.md +4 -16
  182. data/spec/block_docs/xml.md +33 -0
  183. data/{tests/unittest → spec/block_docs}/xml2.md +0 -12
  184. data/spec/block_docs/xml3.md +24 -0
  185. data/{tests/unittest → spec/block_docs}/xml_instruction.md +9 -20
  186. data/spec/block_spec.rb +110 -0
  187. data/spec/cli_spec.rb +8 -0
  188. data/spec/span_spec.rb +256 -0
  189. data/spec/spec_helper.rb +2 -0
  190. data/spec/to_html_utf8_spec.rb +13 -0
  191. metadata +205 -243
  192. metadata.gz.sig +3 -0
  193. data/Rakefile +0 -48
  194. data/bin/marudown +0 -29
  195. data/bin/marutest +0 -345
  196. data/docs/changelog.md +0 -334
  197. data/lib/maruku/errors_management.rb +0 -92
  198. data/lib/maruku/ext/math/latex_fix.rb +0 -12
  199. data/lib/maruku/input/parse_span_better.rb +0 -746
  200. data/lib/maruku/input/type_detection.rb +0 -147
  201. data/lib/maruku/output/to_latex_entities.rb +0 -367
  202. data/lib/maruku/output/to_latex_strings.rb +0 -64
  203. data/lib/maruku/structures.rb +0 -167
  204. data/lib/maruku/structures_inspect.rb +0 -87
  205. data/lib/maruku/structures_iterators.rb +0 -61
  206. data/lib/maruku/tests/benchmark.rb +0 -82
  207. data/lib/maruku/tests/new_parser.rb +0 -373
  208. data/lib/maruku/tests/tests.rb +0 -136
  209. data/lib/maruku/usage/example1.rb +0 -33
  210. data/tests/bugs/code_in_links.md +0 -101
  211. data/tests/bugs/complex_escaping.md +0 -38
  212. data/tests/math/syntax.md +0 -46
  213. data/tests/math_usage/document.md +0 -13
  214. data/tests/others/abbreviations.md +0 -11
  215. data/tests/others/blank.md +0 -4
  216. data/tests/others/code.md +0 -5
  217. data/tests/others/code2.md +0 -8
  218. data/tests/others/code3.md +0 -16
  219. data/tests/others/email.md +0 -4
  220. data/tests/others/entities.md +0 -19
  221. data/tests/others/escaping.md +0 -16
  222. data/tests/others/extra_dl.md +0 -101
  223. data/tests/others/extra_header_id.md +0 -13
  224. data/tests/others/extra_table1.md +0 -40
  225. data/tests/others/footnotes.md +0 -17
  226. data/tests/others/headers.md +0 -10
  227. data/tests/others/hrule.md +0 -10
  228. data/tests/others/images.md +0 -20
  229. data/tests/others/inline_html.md +0 -42
  230. data/tests/others/links.md +0 -38
  231. data/tests/others/list1.md +0 -4
  232. data/tests/others/list2.md +0 -5
  233. data/tests/others/list3.md +0 -8
  234. data/tests/others/lists.md +0 -32
  235. data/tests/others/lists_after_paragraph.md +0 -44
  236. data/tests/others/lists_ol.md +0 -39
  237. data/tests/others/misc_sw.md +0 -105
  238. data/tests/others/one.md +0 -1
  239. data/tests/others/paragraphs.md +0 -13
  240. data/tests/others/sss06.md +0 -352
  241. data/tests/others/test.md +0 -4
  242. data/tests/s5/s5profiling.md +0 -48
  243. data/tests/unittest/bug_def.md +0 -28
  244. data/tests/unittest/email.md +0 -32
  245. data/tests/unittest/html2.md +0 -34
  246. data/tests/unittest/ie.md +0 -61
  247. data/tests/unittest/links2.md +0 -34
  248. data/tests/unittest/lists11.md +0 -28
  249. data/tests/unittest/lists6.md +0 -53
  250. data/tests/unittest/lists9.md +0 -76
  251. data/tests/unittest/math/equations.md +0 -86
  252. data/tests/unittest/math/math2.md +0 -57
  253. data/tests/unittest/math/table.md +0 -37
  254. data/tests/unittest/notyet/header_after_par.md +0 -70
  255. data/tests/unittest/red_tests/abbrev.md +0 -1388
  256. data/tests/unittest/red_tests/lists7.md +0 -68
  257. data/tests/unittest/red_tests/lists7b.md +0 -128
  258. data/tests/unittest/red_tests/lists8.md +0 -76
  259. data/tests/unittest/red_tests/xml.md +0 -70
  260. data/tests/unittest/xml3.md +0 -38
  261. data/tests/utf8-files/simple.md +0 -1
  262. data/unit_test_block.sh +0 -5
  263. data/unit_test_span.sh +0 -3
@@ -0,0 +1,110 @@
1
+ # encoding: UTF-8
2
+ Encoding.default_external=('UTF-8') if ''.respond_to?(:force_encoding)
3
+
4
+ require File.dirname(__FILE__) + '/spec_helper'
5
+ require 'rspec'
6
+ require 'maruku'
7
+ require 'nokogiri/diff'
8
+
9
+ # Allow us to test both HTML parser backends
10
+ MaRuKu::Globals[:html_parser] = ENV['HTML_PARSER'] if ENV['HTML_PARSER']
11
+
12
+ puts "Using HTML parser: #{MaRuKu::Globals[:html_parser]}"
13
+
14
+ # :to_md and :to_s tests are disabled for now
15
+ METHODS = [:to_html, :to_latex]
16
+
17
+ def which(cmd)
18
+ exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : ['']
19
+ ENV['PATH'].split(File::PATH_SEPARATOR).each do |path|
20
+ exts.each { |ext|
21
+ exe = File.join(path, "#{cmd}#{ext}")
22
+ return exe if File.executable? exe
23
+ }
24
+ end
25
+ return nil
26
+ end
27
+
28
+ if which('blahtex')
29
+ HAS_BLAHTEX = true
30
+ else
31
+ HAS_BLAHTEX = false
32
+ puts "Install 'blahtex' to run blahtex math tests"
33
+ end
34
+
35
+ describe "A Maruku doc" do
36
+ before(:all) do
37
+ @old_stderr = $stderr
38
+ $stderr = StringIO.new
39
+ end
40
+
41
+ after(:all) do
42
+ $stderr = @old_stderr
43
+ end
44
+
45
+ Dir[File.dirname(__FILE__) + "/block_docs/**/*.md"].each do |md|
46
+ next if md =~ /blahtex/ && !HAS_BLAHTEX
47
+
48
+ md_pretty = md.sub(File.dirname(__FILE__) + '/', '')
49
+
50
+ describe "#{md_pretty} (using #{MaRuKu::Globals[:html_parser]})" do
51
+ input = File.read(md).split(/\n\*{3}[^*\n]+\*{3}\n/m)
52
+ input = ["Write a comment here", "{}", input.first] if input.size == 1
53
+ comment = input.shift.strip
54
+ params = input.shift || ''
55
+ markdown = input.shift || ''
56
+ ast = input.shift || ''
57
+ expected = METHODS.zip(input).inject({}) {|h, (k, v)| h[k] = v ? v.strip : '' ; h}
58
+
59
+ pending "#{comment} - #{md_pretty}" and next if comment.start_with?("PENDING")
60
+ pending "#{comment} - #{md_pretty}" and next if comment.start_with?("REXML PENDING") && MaRuKu::Globals[:html_parser] == 'rexml'
61
+ pending "#{comment} - #{md_pretty}" and next if comment.start_with?("JRUBY PENDING") && RUBY_PLATFORM == 'java'
62
+ pending "#{comment} - #{md_pretty}" and next if comment.start_with?("JRUBY NOKOGIRI PENDING") && RUBY_PLATFORM == 'java' && MaRuKu::Globals[:html_parser] == 'nokogiri'
63
+
64
+ before(:each) do
65
+ $already_warned_itex2mml = false
66
+ @doc = Maruku.new(markdown, eval(params))
67
+ end
68
+
69
+ it "should read in the output of #inspect as the same document" do
70
+ Maruku.new.instance_eval("#coding: utf-8\n#{@doc.inspect}", md).should == @doc
71
+ end
72
+
73
+ unless ast.strip.empty?
74
+ it "should produce the given AST" do
75
+ @doc.should == Maruku.new.instance_eval(ast, md)
76
+ end
77
+ end
78
+
79
+ unless expected[:to_html].strip.empty?
80
+ it "should have the expected to_html output" do
81
+ res = @doc.to_html.strip
82
+ pending "install itex2mml to run these tests" if $already_warned_itex2mml
83
+
84
+ resdoc = Nokogiri::XML("<dummy>#{res}</dummy>")
85
+ expdoc = Nokogiri::XML("<dummy>#{expected[:to_html]}</dummy>")
86
+
87
+ diff = ""
88
+ changed = false
89
+ expdoc.diff(resdoc) do |change, node|
90
+ diff << "#{change} #{node.inspect}\n"
91
+ changed = true unless change == ' ' || (node.text? && node.content =~ /\A\s*\Z/m)
92
+ end
93
+
94
+ if changed
95
+ res.should == expected[:to_html]
96
+ end
97
+ end
98
+ end
99
+
100
+ unless expected[:to_latex].strip.empty?
101
+ it "should have the expected to_latex output" do
102
+ res = @doc.to_latex.strip
103
+ res.should == expected[:to_latex]
104
+ end
105
+ end
106
+ end
107
+ end
108
+
109
+
110
+ end
@@ -0,0 +1,8 @@
1
+ require File.dirname(__FILE__) + '/spec_helper'
2
+
3
+ describe "The maruku CLI" do
4
+ it "has a nonzero exit code on invalid options" do
5
+ `ruby -Ilib bin/maruku --foo 2>&1`
6
+ $?.exitstatus.should_not == 0
7
+ end
8
+ end
@@ -0,0 +1,256 @@
1
+ require File.dirname(__FILE__) + '/spec_helper'
2
+ require 'rspec'
3
+ require 'maruku'
4
+
5
+ EXPECTATIONS = Maruku.new.instance_eval do
6
+ [
7
+ ["", [], 'Empty string gives empty list'],
8
+ ["a", ["a"], 'Easy char'],
9
+ [" a", ["a"], 'First space in the paragraph is ignored'],
10
+ ["a\n \n", ["a"], 'Last spaces in the paragraphs are ignored'],
11
+ [' ', [], 'One char => nothing'],
12
+ [' ', [], 'Two chars => nothing'],
13
+ ['a b', ['a b'], 'Spaces are compressed'],
14
+ ['a b', ['a b'], 'Newlines are spaces'],
15
+ ["a\nb", ['a b'], 'Newlines are spaces'],
16
+ ["a\n b", ['a b'], 'Compress newlines 1'],
17
+ ["a \nb", ['a b'], 'Compress newlines 2'],
18
+ [" \nb", ['b'], 'Compress newlines 3'],
19
+ ["\nb", ['b'], 'Compress newlines 4'],
20
+ ["b\n", ['b'], 'Compress newlines 5'],
21
+ ["\n", [], 'Compress newlines 6'],
22
+ ["\n\n\n", [], 'Compress newlines 7'],
23
+
24
+ # Code blocks
25
+ ["`" , :raise, 'Unclosed single ticks'],
26
+ ["``" , :raise, 'Unclosed double ticks'],
27
+ ["`a`" , [md_code('a')], 'Simple inline code'],
28
+ ["`` ` ``" , [md_code('`')], ],
29
+ ["`` \\` ``" , [md_code('\\`')], ],
30
+ ["``a``" , [md_code('a')], ],
31
+ ["`` a ``" , [md_code('a')], ],
32
+
33
+ # Newlines
34
+ ["a \n", ['a',md_el(:linebreak)], 'Two spaces give br.'],
35
+ ["a \n", ['a'], 'Newlines 2'],
36
+ [" \n", [md_el(:linebreak)], 'Newlines 3'],
37
+ [" \n \n", [md_el(:linebreak),md_el(:linebreak)],'Newlines 4'],
38
+ [" \na \n", [md_el(:linebreak),'a',md_el(:linebreak)],'Newlines 5'],
39
+
40
+ # Inline HTML
41
+ ["a < b", ['a < b'], '< can be on itself'],
42
+ ["<hr>", [md_html('<hr />')], 'HR will be sanitized'],
43
+ ["<hr/>", [md_html('<hr />')], 'Closed tag is ok'],
44
+ ["<hr />", [md_html('<hr />')], 'Closed tag is ok 2'],
45
+ ["<hr/>a", [md_html('<hr />'),'a'], 'Closed tag is ok 2'],
46
+ ["<em></em>a", [md_html('<em></em>'),'a'], 'Inline HTML 1'],
47
+ ["<em>e</em>a", [md_html('<em>e</em>'),'a'], 'Inline HTML 2'],
48
+ ["a<em>e</em>b", ['a',md_html('<em>e</em>'),'b'], 'Inline HTML 3'],
49
+ ["<em>e</em>a<em>f</em>",
50
+ [md_html('<em>e</em>'),'a',md_html('<em>f</em>')],
51
+ 'Inline HTML 4'],
52
+ ["<em>e</em><em>f</em>a",
53
+ [md_html('<em>e</em>'),md_html('<em>f</em>'),'a'],
54
+ 'Inline HTML 5'],
55
+
56
+ ["<img src='a' />", [md_html("<img src='a' />")], 'Attributes'],
57
+ ["<img src='a'/>"],
58
+
59
+ # emphasis
60
+ ["**", :raise, 'Unclosed double **'],
61
+ ["\\*", ['*'], 'Escaping of *'],
62
+ ["a *b* ", ['a ', md_em('b')], 'Emphasis 1'],
63
+ ["a *b*", ['a ', md_em('b')], 'Emphasis 2'],
64
+ ["a * b", ['a * b'], 'Emphasis 3'],
65
+ ["a * b*", :raise, 'Unclosed emphasis'],
66
+ # same with underscore
67
+ ["__", :raise, 'Unclosed double __'],
68
+ ["\\_", ['_'], 'Escaping of _'],
69
+ ["a _b_ ", ['a ', md_em('b')], 'Emphasis 4'],
70
+ ["a _b_", ['a ', md_em('b')], 'Emphasis 5'],
71
+ ["a _ b", ['a _ b'], 'Emphasis 6'],
72
+ ["a _ b_", :raise, 'Unclosed emphasis'],
73
+ ["_b_", [md_em('b')], 'Emphasis 7'],
74
+ ["_b_ _c_", [md_em('b'),' ',md_em('c')], 'Emphasis 8'],
75
+ ["_b__c_", [md_em('b'),md_em('c')], 'Emphasis 9', true], # PENDING
76
+ # underscores in word
77
+ ["mod_ruby", ['mod_ruby'], 'Word with underscore'],
78
+ # strong
79
+ ["**a*", :raise, 'Unclosed double ** 2'],
80
+ ["\\**a*", ['*', md_em('a')], 'Escaping of *'],
81
+ ["a **b** ", ['a ', md_strong('b')], 'Emphasis 1'],
82
+ ["a **b**", ['a ', md_strong('b')], 'Emphasis 2'],
83
+ ["a ** b", ['a ** b'], 'Emphasis 3'],
84
+ ["a ** b**", :raise, 'Unclosed emphasis'],
85
+ ["**b****c**", [md_strong('b'),md_strong('c')], 'Emphasis 9'],
86
+ ["*italic***bold***italic*", [md_em('italic'), md_strong('bold'), md_em('italic')], 'Bold inbetween italics'], # Issue #103
87
+ # strong (with underscore)
88
+ ["__a_", :raise, 'Unclosed double __ 2'],
89
+
90
+ ["a __b__ ", ['a ', md_strong('b')], 'Emphasis 1'],
91
+ ["a __b__", ['a ', md_strong('b')], 'Emphasis 2'],
92
+ ["a __ b", ['a __ b'], 'Emphasis 3'],
93
+ ["a __ b__", :raise, 'Unclosed emphasis'],
94
+ ["__b____c__", [md_strong('b'),md_strong('c')], 'Emphasis 9'],
95
+ # extra strong
96
+ ["***a**", :raise, 'Unclosed triple *** '],
97
+ ["\\***a**", ['*', md_strong('a')], 'Escaping of *'],
98
+ ["a ***b*** ", ['a ', md_emstrong('b')], 'Strong elements'],
99
+ ["a ***b***", ['a ', md_emstrong('b')]],
100
+ ["a *** b", ['a *** b']],
101
+ ["a ** * b", ['a ** * b']],
102
+ ["***b******c***", [md_emstrong('b'),md_emstrong('c')]],
103
+ ["a *** b***", :raise, 'Unclosed emphasis'],
104
+ # same with underscores
105
+ ["___a__", :raise, 'Unclosed triple *** '],
106
+ ["a ___b___ ", ['a ', md_emstrong('b')], 'Strong elements'],
107
+ ["a ___b___", ['a ', md_emstrong('b')]],
108
+ ["a ___ b", ['a ___ b']],
109
+ ["a __ _ b", ['a __ _ b']],
110
+ ["___b______c___", [md_emstrong('b'),md_emstrong('c')]],
111
+ ["a ___ b___", :raise, 'Unclosed emphasis'],
112
+ # mixing is bad
113
+ ["*a_", :raise, 'Mixing is bad'],
114
+ ["_a*", :raise],
115
+ ["**a__", :raise],
116
+ ["__a**", :raise],
117
+ ["___a***", :raise],
118
+ ["***a___", :raise],
119
+ ["*This is in italic, and this is **bold**.*", [md_em(["This is in italic, and this is ", md_strong("bold"), "."])], 'Issue #23'],
120
+
121
+ # links of the form [text][ref]
122
+ ["\\[a]", ["[a]"], 'Escaping 1'],
123
+ ["\\[a\\]", ["[a]"], 'Escaping 2'],
124
+ # This is valid in the new Markdown version
125
+ ["[a]", [ md_link(["a"],nil)], 'Empty link'],
126
+ ["[a][]", [ md_link(["a"],'')] ],
127
+ ["[a][]b", [ md_link(["a"],''),'b'], 'Empty link'],
128
+ ["[a\\]][]", [ md_link(["a]"],'')], 'Escape inside link (throw ?] away)'],
129
+
130
+ ["[a", :raise, 'Link not closed'],
131
+ ["[a][", :raise, 'Ref not closed'],
132
+
133
+ # links of the form [text](url)
134
+ ["\\[a](b)", ["[a](b)"], 'Links'],
135
+ ["[a](url)c", [md_im_link(['a'],'url'),'c'], 'url'],
136
+ ["[a]( url )c" ],
137
+ ["[a] ( url )c" ],
138
+ ["[a] ( url)c" ],
139
+
140
+ ["[a](ur:/l/ 'Title')", [md_im_link(['a'],'ur:/l/','Title')],
141
+ 'url and title'],
142
+ ["[a] ( ur:/l/ \"Title\")" ],
143
+ ["[a] ( ur:/l/ \"Title\")" ],
144
+ ["[a]( ur:/l/ Title)", :raise, "Must quote title" ],
145
+
146
+ ["[a](url 'Tit\\\"l\\\\e')", [md_im_link(['a'],'url','Tit"l\\e')],
147
+ 'url and title escaped'],
148
+ ["[a] ( url \"Tit\\\"l\\\\e\")" ],
149
+ ["[a] ( url \"Tit\\\"l\\\\e\" )" ],
150
+ ['[a] ( url "Tit\\"l\\\\e" )' ],
151
+ ["[a]()", [md_im_link(['a'],'')], 'No URL is OK'],
152
+
153
+ ["[a](\"Title\")", :raise, "No url specified" ],
154
+ ["[a](url \"Title)", :raise, "Unclosed quotes" ],
155
+ ["[a](url \"Title\\\")", :raise],
156
+ ["[a](url \"Title\" ", :raise],
157
+
158
+ ["[a](url \'Title\")", :raise, "Mixing is bad" ],
159
+ ["[a](url \"Title\')"],
160
+
161
+ ["[a](/url)", [md_im_link(['a'],'/url')], 'Funny chars in url'],
162
+ ["[a](#url)", [md_im_link(['a'],'#url')]],
163
+ ["[a](</script?foo=1&bar=2>)", [md_im_link(['a'],'/script?foo=1&bar=2')]],
164
+
165
+
166
+ # Images
167
+ ["\\![a](url)", ['!', md_im_link(['a'],'url') ], 'Escaping images'],
168
+
169
+ ["![a](url)", [md_im_image(['a'],'url')], 'Image no title'],
170
+ ["![a]( url )" ],
171
+ ["![a] ( url )" ],
172
+ ["![a] ( url)" ],
173
+
174
+ ["![a](url 'ti\"tle')", [md_im_image(['a'],'url','ti"tle')], 'Image with title'],
175
+ ['![a]( url "ti\\"tle")' ],
176
+
177
+ ["![a](url", :raise, 'Invalid images'],
178
+ ["![a( url )" ],
179
+ ["![a] ('url )" ],
180
+
181
+ ["![a][imref]", [md_image(['a'],'imref')], 'Image with ref'],
182
+ ["![a][ imref]", [md_image(['a'],' imref')], 'Image with ref'],
183
+ ["![a][ imref ]", [md_image(['a'],' imref ' )], 'Image with ref'],
184
+ ["![a][\timref\t]", [md_image(['a'],"\timref\t")], 'Image with ref'],
185
+
186
+
187
+ ['<http://example.com/?foo=1&bar=2>',
188
+ [md_url('http://example.com/?foo=1&bar=2')], 'Immediate link'],
189
+ ['a<http://example.com/?foo=1&bar=2>b',
190
+ ['a',md_url('http://example.com/?foo=1&bar=2'),'b'] ],
191
+ ['<andrea@censi.org>',
192
+ [md_email('andrea@censi.org')], 'Email address'],
193
+ ['<mailto:andrea@censi.org>'],
194
+ ["Developmen <http://rubyforge.org/projects/maruku/>",
195
+ ["Developmen ", md_url("http://rubyforge.org/projects/maruku/")]],
196
+ ["a<!-- -->b", ['a',md_html('<!-- -->'),'b'],
197
+ 'HTML Comment'],
198
+
199
+ ["a<!--", :raise, 'Bad HTML Comment'],
200
+ ["a<!-- ", :raise, 'Bad HTML Comment'],
201
+
202
+ ["<?xml <?!--!`3 ?>", [md_xml_instr('xml','<?!--!`3')], 'XML processing instruction'],
203
+ ["<? <?!--!`3 ?>", [md_xml_instr('','<?!--!`3')] ],
204
+
205
+ ["<? ", :raise, 'Bad Server directive'],
206
+
207
+ ["a <b", :raise, 'Bad HTML 1'],
208
+ ["<b", :raise, 'Bad HTML 2'],
209
+ ["<b!", :raise, 'Bad HTML 3'],
210
+ ['`<div>`, `<table>`, `<pre>`, `<p>`',
211
+ [md_code('<div>'),', ',md_code('<table>'),', ',
212
+ md_code('<pre>'),', ',md_code('<p>')],
213
+ 'Multiple HTML tags'],
214
+
215
+ ["&andrea", ["&andrea"], 'Parsing of entities'],
216
+ # no escaping is allowed
217
+ ["\\&andrea;", ["\\", md_entity("andrea")]],
218
+ ["l&andrea;", ["l", md_entity('andrea')] ],
219
+ ["&&andrea;", ["&", md_entity('andrea')] ],
220
+ ["&123;;&amp;",[md_entity('123'),';',md_entity('amp')]],
221
+
222
+ ["a\nThe [syntax page] [s] provides",
223
+ ['a The ', md_link(['syntax page'],'s'), ' provides'], 'Regression'],
224
+
225
+ ['![a](url "ti"tle")', [md_im_image(['a'],'url','ti"tle')],
226
+ "Image with quotes"],
227
+ ['![a](url \'ti"tle\')' ],
228
+
229
+ ['[bar](/url/ "Title with "quotes" inside")',
230
+ [md_im_link(["bar"],'/url/', 'Title with "quotes" inside')],
231
+ "Link with quotes"],
232
+ ]
233
+ end
234
+
235
+ EXPECTATIONS.each_cons(2) {|l, r| r[1] ||= l[1]}
236
+
237
+ describe "The Maruku span parser" do
238
+ before(:each) do
239
+ @doc = Maruku.new
240
+ @doc.attributes[:on_error] = :raise
241
+ end
242
+
243
+ EXPECTATIONS.each do |md, res, comment, pend|
244
+ if res == :raise
245
+ it "should raise an error (#{comment}) for \"#{md}\"" do
246
+ pending if pend
247
+ lambda {@doc.parse_span(md)}.should raise_error(Maruku::Exception)
248
+ end
249
+ else
250
+ it "should parse \"#{md}\" as #{res.inspect}" do
251
+ pending if pend
252
+ @doc.parse_span(md).should == res
253
+ end
254
+ end
255
+ end
256
+ end
@@ -0,0 +1,2 @@
1
+ require 'simplecov'
2
+ SimpleCov.root(File.expand_path(File.dirname(__FILE__) + '/..'))
@@ -0,0 +1,13 @@
1
+ # encoding: UTF-8
2
+
3
+ require File.dirname(__FILE__) + '/spec_helper'
4
+ require 'rspec'
5
+ require 'maruku'
6
+
7
+ describe "Maruku to_html" do
8
+ # This test used to hang in JRuby!
9
+ it "can produce HTML for a document that contains non-ASCII characters" do
10
+ doc = Maruku.new.instance_eval 'md_el(:document,["è"],{},[])'
11
+ doc.to_html.strip.should == "è"
12
+ end
13
+ end
metadata CHANGED
@@ -1,90 +1,56 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: maruku
3
- version: !ruby/object:Gem::Version
4
- hash: 5
5
- prerelease:
6
- segments:
7
- - 0
8
- - 6
9
- - 1
10
- version: 0.6.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.7.0.beta1
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Andrea Censi
14
8
  - Nathan Weizenbaum
15
- autorequire: maruku
9
+ - Ben Hollis
10
+ autorequire:
16
11
  bindir: bin
17
- cert_chain: []
18
-
19
- date: 2012-09-16 00:00:00 Z
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
22
- version_requirements: &id001 !ruby/object:Gem::Requirement
23
- none: false
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- hash: 23
28
- segments:
29
- - 1
30
- - 0
31
- - 0
32
- version: 1.0.0
33
- prerelease: false
34
- requirement: *id001
35
- name: syntax
36
- type: :runtime
37
- - !ruby/object:Gem::Dependency
38
- version_requirements: &id002 !ruby/object:Gem::Requirement
39
- none: false
40
- requirements:
41
- - - ~>
42
- - !ruby/object:Gem::Version
43
- hash: 23
44
- segments:
45
- - 1
46
- - 0
47
- - 0
48
- version: 1.0.0
49
- prerelease: false
50
- requirement: *id002
51
- name: syntax
52
- type: :development
53
- - !ruby/object:Gem::Dependency
54
- version_requirements: &id003 !ruby/object:Gem::Requirement
55
- none: false
56
- requirements:
57
- - - ~>
58
- - !ruby/object:Gem::Version
59
- hash: 63
60
- segments:
61
- - 0
62
- - 9
63
- - 2
64
- version: 0.9.2
65
- prerelease: false
66
- requirement: *id003
67
- name: rake
68
- type: :development
69
- description: "Maruku is a Markdown interpreter in Ruby.\n\
70
- \tIt features native export to HTML and PDF (via Latex). The\n\
71
- \toutput is really beautiful!\n\
72
- \t"
12
+ cert_chain:
13
+ - |
14
+ -----BEGIN CERTIFICATE-----
15
+ MIIDbDCCAlSgAwIBAgIBATANBgkqhkiG9w0BAQUFADA+MQwwCgYDVQQDDANiZW4x
16
+ GTAXBgoJkiaJk/IsZAEZFgliZW5ob2xsaXMxEzARBgoJkiaJk/IsZAEZFgNuZXQw
17
+ HhcNMTMwMzExMDI1NTUzWhcNMTQwMzExMDI1NTUzWjA+MQwwCgYDVQQDDANiZW4x
18
+ GTAXBgoJkiaJk/IsZAEZFgliZW5ob2xsaXMxEzARBgoJkiaJk/IsZAEZFgNuZXQw
19
+ ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC5zj8rp/43ROFWTrOmaXFI
20
+ saYRkgYgv5y0+10/MRZDPYT3i42GRmCPRd+ZWAVPKGJCRgSizgAfPSYh8+CFceFm
21
+ ZVzeTd5haVWgsSkLpDHc3CuIUnanEOhlLcNt7bjofoxiZaqMm8ntLGAPARunOn4H
22
+ whN7a82KEMRYCqC0H1TvTR15K7Fb40U6UgrqwiaQtDvTyIALakzICl2mBk5we3La
23
+ OAgoKVT0SDAUa8E4BSitpOpukNTPPy7r0WKb8yO69ON19LGxg17tDJjolKYsScOt
24
+ +nXZj7HJwfBkn9m6zxDqCk7mvAvybH7oMOCzrxLB9kxSOjNOCVnOV26Bj5xPUY8p
25
+ AgMBAAGjdTBzMAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBTXpLoI
26
+ loLWXfgQPVg/t4cAuHJZeDAcBgNVHREEFTATgRFiZW5AYmVuaG9sbGlzLm5ldDAc
27
+ BgNVHRIEFTATgRFiZW5AYmVuaG9sbGlzLm5ldDANBgkqhkiG9w0BAQUFAAOCAQEA
28
+ CYVy5TtuDMQz7ddO+bc+Jve9V6o1Fpu6bXTlwsXafXtfOeJ3/+0g+WboTCbCWjIR
29
+ JnPcE2vCVrLF48PpR3YWVRGZai4YxRXdmZEcVDnJReymUHVu0hZdcxV6+LecoZ5a
30
+ X06W7WI+JhEKb5zIgGFGuW074n0el0il85NI/frb9D3dOKqU5+NK7hrRO8rjWLXo
31
+ U+KBnqpu0lI1TIAshS1R8JYVLIixEg6sl3+QljvpDQW+P4D1qg6wspdjKj91/geA
32
+ KwEyUbH6HjXBdbfv95jHa8ncuWqIryt/ywGZg3sbPVsscZA9RcyDtUQRnlHSGRWH
33
+ ZSsIzVZvxIwTYa0z3d+JWQ==
34
+ -----END CERTIFICATE-----
35
+ date: 2013-09-16 00:00:00.000000000 Z
36
+ dependencies: []
37
+ description: "Maruku is a Markdown interpreter in Ruby.\n\tIt features native export
38
+ to HTML and PDF (via Latex). The\n\toutput is really beautiful!"
73
39
  email: ben@benhollis.net
74
- executables:
40
+ executables:
75
41
  - maruku
76
42
  - marutex
77
43
  extensions: []
78
-
79
44
  extra_rdoc_files: []
80
-
81
- files:
45
+ files:
82
46
  - lib/maruku/attributes.rb
83
47
  - lib/maruku/defaults.rb
84
- - lib/maruku/errors_management.rb
48
+ - lib/maruku/document.rb
49
+ - lib/maruku/element.rb
50
+ - lib/maruku/errors.rb
85
51
  - lib/maruku/ext/div.rb
52
+ - lib/maruku/ext/fenced_code.rb
86
53
  - lib/maruku/ext/math/elements.rb
87
- - lib/maruku/ext/math/latex_fix.rb
88
54
  - lib/maruku/ext/math/mathml_engines/blahtex.rb
89
55
  - lib/maruku/ext/math/mathml_engines/itex2mml.rb
90
56
  - lib/maruku/ext/math/mathml_engines/none.rb
@@ -94,38 +60,31 @@ files:
94
60
  - lib/maruku/ext/math/to_latex.rb
95
61
  - lib/maruku/ext/math.rb
96
62
  - lib/maruku/helpers.rb
63
+ - lib/maruku/html.rb
97
64
  - lib/maruku/input/charsource.rb
98
65
  - lib/maruku/input/extensions.rb
99
66
  - lib/maruku/input/html_helper.rb
100
67
  - lib/maruku/input/linesource.rb
68
+ - lib/maruku/input/mdline.rb
101
69
  - lib/maruku/input/parse_block.rb
102
70
  - lib/maruku/input/parse_doc.rb
103
- - lib/maruku/input/parse_span_better.rb
71
+ - lib/maruku/input/parse_span.rb
104
72
  - lib/maruku/input/rubypants.rb
105
- - lib/maruku/input/type_detection.rb
106
73
  - lib/maruku/input_textile2/t2_parser.rb
74
+ - lib/maruku/inspect_element.rb
107
75
  - lib/maruku/maruku.rb
76
+ - lib/maruku/output/entity_table.rb
108
77
  - lib/maruku/output/s5/fancy.rb
109
78
  - lib/maruku/output/s5/to_s5.rb
110
79
  - lib/maruku/output/to_html.rb
111
80
  - lib/maruku/output/to_latex.rb
112
- - lib/maruku/output/to_latex_entities.rb
113
- - lib/maruku/output/to_latex_strings.rb
114
81
  - lib/maruku/output/to_markdown.rb
115
82
  - lib/maruku/output/to_s.rb
116
83
  - lib/maruku/string_utils.rb
117
- - lib/maruku/structures.rb
118
- - lib/maruku/structures_inspect.rb
119
- - lib/maruku/structures_iterators.rb
120
- - lib/maruku/tests/benchmark.rb
121
- - lib/maruku/tests/new_parser.rb
122
- - lib/maruku/tests/tests.rb
123
84
  - lib/maruku/textile2.rb
124
85
  - lib/maruku/toc.rb
125
- - lib/maruku/usage/example1.rb
126
86
  - lib/maruku/version.rb
127
87
  - lib/maruku.rb
128
- - docs/changelog.md
129
88
  - docs/div_syntax.md
130
89
  - docs/entity_test.md
131
90
  - docs/markdown_syntax.md
@@ -133,172 +92,175 @@ files:
133
92
  - docs/math.md
134
93
  - docs/other_stuff.md
135
94
  - docs/proposal.md
136
- - tests/bugs/code_in_links.md
137
- - tests/bugs/complex_escaping.md
138
- - tests/math/syntax.md
139
- - tests/math_usage/document.md
140
- - tests/others/abbreviations.md
141
- - tests/others/blank.md
142
- - tests/others/code.md
143
- - tests/others/code2.md
144
- - tests/others/code3.md
145
- - tests/others/email.md
146
- - tests/others/entities.md
147
- - tests/others/escaping.md
148
- - tests/others/extra_dl.md
149
- - tests/others/extra_header_id.md
150
- - tests/others/extra_table1.md
151
- - tests/others/footnotes.md
152
- - tests/others/headers.md
153
- - tests/others/hrule.md
154
- - tests/others/images.md
155
- - tests/others/inline_html.md
156
- - tests/others/links.md
157
- - tests/others/list1.md
158
- - tests/others/list2.md
159
- - tests/others/list3.md
160
- - tests/others/lists.md
161
- - tests/others/lists_after_paragraph.md
162
- - tests/others/lists_ol.md
163
- - tests/others/misc_sw.md
164
- - tests/others/one.md
165
- - tests/others/paragraphs.md
166
- - tests/others/sss06.md
167
- - tests/others/test.md
168
- - tests/s5/s5profiling.md
169
- - tests/unittest/abbreviations.md
170
- - tests/unittest/alt.md
171
- - tests/unittest/attributes/att2.md
172
- - tests/unittest/attributes/att3.md
173
- - tests/unittest/attributes/attributes.md
174
- - tests/unittest/attributes/circular.md
175
- - tests/unittest/attributes/default.md
176
- - tests/unittest/blank.md
177
- - tests/unittest/blanks_in_code.md
178
- - tests/unittest/bug_def.md
179
- - tests/unittest/bug_table.md
180
- - tests/unittest/code.md
181
- - tests/unittest/code2.md
182
- - tests/unittest/code3.md
183
- - tests/unittest/data_loss.md
184
- - tests/unittest/divs/div1.md
185
- - tests/unittest/divs/div2.md
186
- - tests/unittest/divs/div3_nest.md
187
- - tests/unittest/easy.md
188
- - tests/unittest/email.md
189
- - tests/unittest/encoding/iso-8859-1.md
190
- - tests/unittest/encoding/utf-8.md
191
- - tests/unittest/entities.md
192
- - tests/unittest/escaping.md
193
- - tests/unittest/extra_dl.md
194
- - tests/unittest/extra_header_id.md
195
- - tests/unittest/extra_table1.md
196
- - tests/unittest/footnotes.md
197
- - tests/unittest/headers.md
198
- - tests/unittest/hex_entities.md
199
- - tests/unittest/hrule.md
200
- - tests/unittest/html2.md
201
- - tests/unittest/html3.md
202
- - tests/unittest/html4.md
203
- - tests/unittest/html5.md
204
- - tests/unittest/ie.md
205
- - tests/unittest/images.md
206
- - tests/unittest/images2.md
207
- - tests/unittest/inline_html.md
208
- - tests/unittest/inline_html2.md
209
- - tests/unittest/links.md
210
- - tests/unittest/links2.md
211
- - tests/unittest/list1.md
212
- - tests/unittest/list12.md
213
- - tests/unittest/list2.md
214
- - tests/unittest/list3.md
215
- - tests/unittest/list4.md
216
- - tests/unittest/lists.md
217
- - tests/unittest/lists10.md
218
- - tests/unittest/lists11.md
219
- - tests/unittest/lists6.md
220
- - tests/unittest/lists9.md
221
- - tests/unittest/lists_after_paragraph.md
222
- - tests/unittest/lists_ol.md
223
- - tests/unittest/loss.md
224
- - tests/unittest/math/equations.md
225
- - tests/unittest/math/inline.md
226
- - tests/unittest/math/math2.md
227
- - tests/unittest/math/notmath.md
228
- - tests/unittest/math/table.md
229
- - tests/unittest/math/table2.md
230
- - tests/unittest/misc_sw.md
231
- - tests/unittest/notyet/escape.md
232
- - tests/unittest/notyet/header_after_par.md
233
- - tests/unittest/notyet/ticks.md
234
- - tests/unittest/notyet/triggering.md
235
- - tests/unittest/olist.md
236
- - tests/unittest/one.md
237
- - tests/unittest/paragraph.md
238
- - tests/unittest/paragraph_rules/dont_merge_ref.md
239
- - tests/unittest/paragraph_rules/tab_is_blank.md
240
- - tests/unittest/paragraphs.md
241
- - tests/unittest/pending/amps.md
242
- - tests/unittest/pending/empty_cells.md
243
- - tests/unittest/pending/link.md
244
- - tests/unittest/pending/ref.md
245
- - tests/unittest/recover/recover_links.md
246
- - tests/unittest/red_tests/abbrev.md
247
- - tests/unittest/red_tests/lists7.md
248
- - tests/unittest/red_tests/lists7b.md
249
- - tests/unittest/red_tests/lists8.md
250
- - tests/unittest/red_tests/xml.md
251
- - tests/unittest/references/long_example.md
252
- - tests/unittest/references/spaces_and_numbers.md
253
- - tests/unittest/smartypants.md
254
- - tests/unittest/syntax_hl.md
255
- - tests/unittest/table_attributes.md
256
- - tests/unittest/test.md
257
- - tests/unittest/underscore_in_words.md
258
- - tests/unittest/wrapping.md
259
- - tests/unittest/xml2.md
260
- - tests/unittest/xml3.md
261
- - tests/unittest/xml_instruction.md
262
- - tests/utf8-files/simple.md
263
- - bin/marudown
95
+ - spec/block_spec.rb
96
+ - spec/cli_spec.rb
97
+ - spec/span_spec.rb
98
+ - spec/spec_helper.rb
99
+ - spec/to_html_utf8_spec.rb
100
+ - spec/block_docs/abbrev.md
101
+ - spec/block_docs/abbreviations.md
102
+ - spec/block_docs/alt.md
103
+ - spec/block_docs/amps.md
104
+ - spec/block_docs/attributes/att2.md
105
+ - spec/block_docs/attributes/att3.md
106
+ - spec/block_docs/attributes/attributes.md
107
+ - spec/block_docs/attributes/circular.md
108
+ - spec/block_docs/attributes/default.md
109
+ - spec/block_docs/blank.md
110
+ - spec/block_docs/blanks_in_code.md
111
+ - spec/block_docs/bug_def.md
112
+ - spec/block_docs/bug_table.md
113
+ - spec/block_docs/code.md
114
+ - spec/block_docs/code2.md
115
+ - spec/block_docs/code3.md
116
+ - spec/block_docs/data_loss.md
117
+ - spec/block_docs/divs/div1.md
118
+ - spec/block_docs/divs/div2.md
119
+ - spec/block_docs/divs/div3_nest.md
120
+ - spec/block_docs/easy.md
121
+ - spec/block_docs/email.md
122
+ - spec/block_docs/empty_cells.md
123
+ - spec/block_docs/encoding/iso-8859-1.md
124
+ - spec/block_docs/encoding/utf-8.md
125
+ - spec/block_docs/entities.md
126
+ - spec/block_docs/escape.md
127
+ - spec/block_docs/escaping.md
128
+ - spec/block_docs/extra_dl.md
129
+ - spec/block_docs/extra_header_id.md
130
+ - spec/block_docs/extra_table1.md
131
+ - spec/block_docs/fenced_code_blocks.md
132
+ - spec/block_docs/fenced_code_blocks_highlighted.md
133
+ - spec/block_docs/footnotes.md
134
+ - spec/block_docs/footnotes2.md
135
+ - spec/block_docs/hard.md
136
+ - spec/block_docs/header_after_par.md
137
+ - spec/block_docs/headers.md
138
+ - spec/block_docs/hex_entities.md
139
+ - spec/block_docs/hrule.md
140
+ - spec/block_docs/html3.md
141
+ - spec/block_docs/html4.md
142
+ - spec/block_docs/html5.md
143
+ - spec/block_docs/html_block_in_para.md
144
+ - spec/block_docs/html_inline.md
145
+ - spec/block_docs/html_trailing.md
146
+ - spec/block_docs/ie.md
147
+ - spec/block_docs/iframe.md
148
+ - spec/block_docs/images.md
149
+ - spec/block_docs/images2.md
150
+ - spec/block_docs/inline_html.md
151
+ - spec/block_docs/inline_html2.md
152
+ - spec/block_docs/inline_html_beginning.md
153
+ - spec/block_docs/issue20.md
154
+ - spec/block_docs/issue26.md
155
+ - spec/block_docs/issue29.md
156
+ - spec/block_docs/issue30.md
157
+ - spec/block_docs/issue31.md
158
+ - spec/block_docs/issue40.md
159
+ - spec/block_docs/issue64.md
160
+ - spec/block_docs/issue67.md
161
+ - spec/block_docs/issue70.md
162
+ - spec/block_docs/issue72.md
163
+ - spec/block_docs/issue74.md
164
+ - spec/block_docs/issue79.md
165
+ - spec/block_docs/issue83.md
166
+ - spec/block_docs/issue85.md
167
+ - spec/block_docs/issue88.md
168
+ - spec/block_docs/issue89.md
169
+ - spec/block_docs/issue90.md
170
+ - spec/block_docs/link.md
171
+ - spec/block_docs/links.md
172
+ - spec/block_docs/links2.md
173
+ - spec/block_docs/list1.md
174
+ - spec/block_docs/list12.md
175
+ - spec/block_docs/list2.md
176
+ - spec/block_docs/list_multipara.md
177
+ - spec/block_docs/lists.md
178
+ - spec/block_docs/lists10.md
179
+ - spec/block_docs/lists11.md
180
+ - spec/block_docs/lists12.md
181
+ - spec/block_docs/lists13.md
182
+ - spec/block_docs/lists14.md
183
+ - spec/block_docs/lists15.md
184
+ - spec/block_docs/lists6.md
185
+ - spec/block_docs/lists7b.md
186
+ - spec/block_docs/lists9.md
187
+ - spec/block_docs/lists_after_paragraph.md
188
+ - spec/block_docs/lists_blank.md
189
+ - spec/block_docs/lists_blockquote_code.md
190
+ - spec/block_docs/lists_need_blank_line.md
191
+ - spec/block_docs/lists_nested.md
192
+ - spec/block_docs/lists_nested_blankline.md
193
+ - spec/block_docs/lists_nested_deep.md
194
+ - spec/block_docs/lists_ol.md
195
+ - spec/block_docs/lists_paraindent.md
196
+ - spec/block_docs/lists_tab.md
197
+ - spec/block_docs/loss.md
198
+ - spec/block_docs/math/embedded_invalid_svg.md
199
+ - spec/block_docs/math/embedded_svg.md
200
+ - spec/block_docs/math/equations.md
201
+ - spec/block_docs/math/inline.md
202
+ - spec/block_docs/math/math2.md
203
+ - spec/block_docs/math/notmath.md
204
+ - spec/block_docs/math/raw_mathml.md
205
+ - spec/block_docs/math/table.md
206
+ - spec/block_docs/math/table2.md
207
+ - spec/block_docs/math-blahtex/equations.md
208
+ - spec/block_docs/math-blahtex/inline.md
209
+ - spec/block_docs/math-blahtex/math2.md
210
+ - spec/block_docs/math-blahtex/table.md
211
+ - spec/block_docs/misc_sw.md
212
+ - spec/block_docs/olist.md
213
+ - spec/block_docs/one.md
214
+ - spec/block_docs/paragraph.md
215
+ - spec/block_docs/paragraph_rules/dont_merge_ref.md
216
+ - spec/block_docs/paragraph_rules/tab_is_blank.md
217
+ - spec/block_docs/paragraphs.md
218
+ - spec/block_docs/recover/recover_links.md
219
+ - spec/block_docs/ref_with_period.md
220
+ - spec/block_docs/ref_with_title.md
221
+ - spec/block_docs/references/long_example.md
222
+ - spec/block_docs/references/spaces_and_numbers.md
223
+ - spec/block_docs/smartypants.md
224
+ - spec/block_docs/syntax_hl.md
225
+ - spec/block_docs/table_attributes.md
226
+ - spec/block_docs/tables.md
227
+ - spec/block_docs/test.md
228
+ - spec/block_docs/ticks.md
229
+ - spec/block_docs/toc.md
230
+ - spec/block_docs/triggering.md
231
+ - spec/block_docs/underscore_in_words.md
232
+ - spec/block_docs/wrapping.md
233
+ - spec/block_docs/xml.md
234
+ - spec/block_docs/xml2.md
235
+ - spec/block_docs/xml3.md
236
+ - spec/block_docs/xml_instruction.md
237
+ - data/entities.xml
264
238
  - bin/maruku
265
- - bin/marutest
266
239
  - bin/marutex
267
- - unit_test_block.sh
268
- - unit_test_span.sh
269
- - Rakefile
240
+ - MIT-LICENSE.txt
270
241
  homepage: http://github.com/bhollis/maruku
271
- licenses:
272
- - GPL-2
242
+ licenses:
243
+ - MIT
244
+ metadata: {}
273
245
  post_install_message:
274
246
  rdoc_options: []
275
-
276
- require_paths:
247
+ require_paths:
277
248
  - lib
278
- required_ruby_version: !ruby/object:Gem::Requirement
279
- none: false
280
- requirements:
281
- - - ">="
282
- - !ruby/object:Gem::Version
283
- hash: 3
284
- segments:
285
- - 0
286
- version: "0"
287
- required_rubygems_version: !ruby/object:Gem::Requirement
288
- none: false
289
- requirements:
290
- - - ">="
291
- - !ruby/object:Gem::Version
292
- hash: 3
293
- segments:
294
- - 0
295
- version: "0"
249
+ required_ruby_version: !ruby/object:Gem::Requirement
250
+ requirements:
251
+ - - '>='
252
+ - !ruby/object:Gem::Version
253
+ version: 1.8.7
254
+ required_rubygems_version: !ruby/object:Gem::Requirement
255
+ requirements:
256
+ - - '>'
257
+ - !ruby/object:Gem::Version
258
+ version: 1.3.1
296
259
  requirements: []
297
-
298
260
  rubyforge_project:
299
- rubygems_version: 1.8.11
261
+ rubygems_version: 2.0.3
300
262
  signing_key:
301
- specification_version: 3
263
+ specification_version: 4
302
264
  summary: Maruku is a Markdown-superset interpreter written in Ruby.
303
265
  test_files: []
304
-
266
+ has_rdoc: