motion-kramdown 0.6.0 → 1.16.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +6 -2
  3. data/lib/kramdown.rb +1 -1
  4. data/lib/kramdown/converter.rb +10 -11
  5. data/lib/kramdown/converter/base.rb +19 -12
  6. data/lib/kramdown/converter/hash_ast.rb +38 -0
  7. data/lib/kramdown/converter/html.rb +71 -39
  8. data/lib/kramdown/converter/kramdown.rb +19 -10
  9. data/lib/kramdown/converter/latex.rb +28 -10
  10. data/lib/kramdown/converter/man.rb +303 -0
  11. data/lib/kramdown/converter/math_engine/itex2mml.rb +2 -2
  12. data/lib/kramdown/converter/math_engine/mathjax.rb +13 -3
  13. data/lib/kramdown/converter/math_engine/mathjaxnode.rb +56 -0
  14. data/lib/kramdown/converter/math_engine/ritex.rb +2 -2
  15. data/lib/kramdown/converter/math_engine/sskatex.rb +97 -0
  16. data/lib/kramdown/converter/pdf.rb +6 -6
  17. data/lib/kramdown/converter/remove_html_tags.rb +5 -3
  18. data/lib/kramdown/converter/syntax_highlighter.rb +5 -2
  19. data/lib/kramdown/converter/syntax_highlighter/coderay.rb +8 -5
  20. data/lib/kramdown/converter/syntax_highlighter/minted.rb +35 -0
  21. data/lib/kramdown/converter/syntax_highlighter/rouge.rb +48 -10
  22. data/lib/kramdown/converter/toc.rb +2 -2
  23. data/lib/kramdown/document.rb +16 -19
  24. data/lib/kramdown/element.rb +5 -1
  25. data/lib/kramdown/error.rb +1 -1
  26. data/lib/kramdown/options.rb +103 -7
  27. data/lib/kramdown/parser.rb +1 -1
  28. data/lib/kramdown/parser/base.rb +12 -18
  29. data/lib/kramdown/parser/gfm.rb +142 -11
  30. data/lib/kramdown/parser/html.rb +28 -18
  31. data/lib/kramdown/parser/kramdown.rb +45 -36
  32. data/lib/kramdown/parser/kramdown/abbreviation.rb +1 -1
  33. data/lib/kramdown/parser/kramdown/autolink.rb +2 -8
  34. data/lib/kramdown/parser/kramdown/blank_line.rb +2 -2
  35. data/lib/kramdown/parser/kramdown/block_boundary.rb +4 -4
  36. data/lib/kramdown/parser/kramdown/blockquote.rb +4 -4
  37. data/lib/kramdown/parser/kramdown/codeblock.rb +11 -8
  38. data/lib/kramdown/parser/kramdown/codespan.rb +1 -1
  39. data/lib/kramdown/parser/kramdown/emphasis.rb +2 -2
  40. data/lib/kramdown/parser/kramdown/eob.rb +1 -1
  41. data/lib/kramdown/parser/kramdown/escaped_chars.rb +1 -1
  42. data/lib/kramdown/parser/kramdown/extensions.rb +6 -3
  43. data/lib/kramdown/parser/kramdown/footnote.rb +4 -5
  44. data/lib/kramdown/parser/kramdown/header.rb +2 -2
  45. data/lib/kramdown/parser/kramdown/horizontal_rule.rb +1 -1
  46. data/lib/kramdown/parser/kramdown/html.rb +8 -8
  47. data/lib/kramdown/parser/kramdown/html_entity.rb +2 -2
  48. data/lib/kramdown/parser/kramdown/line_break.rb +1 -1
  49. data/lib/kramdown/parser/kramdown/link.rb +5 -4
  50. data/lib/kramdown/parser/kramdown/list.rb +17 -10
  51. data/lib/kramdown/parser/kramdown/math.rb +2 -2
  52. data/lib/kramdown/parser/kramdown/paragraph.rb +19 -8
  53. data/lib/kramdown/parser/kramdown/smart_quotes.rb +3 -3
  54. data/lib/kramdown/parser/kramdown/table.rb +10 -12
  55. data/lib/kramdown/parser/kramdown/typographic_symbol.rb +1 -1
  56. data/lib/kramdown/parser/markdown.rb +2 -2
  57. data/lib/kramdown/utils.rb +2 -1
  58. data/lib/kramdown/utils/configurable.rb +2 -2
  59. data/lib/kramdown/utils/entities.rb +1 -1
  60. data/lib/kramdown/utils/html.rb +2 -2
  61. data/lib/kramdown/utils/lru_cache.rb +40 -0
  62. data/lib/kramdown/utils/ordered_hash.rb +2 -71
  63. data/lib/kramdown/utils/string_scanner.rb +2 -2
  64. data/lib/kramdown/utils/unidecoder.rb +2 -2
  65. data/lib/kramdown/version.rb +2 -2
  66. data/lib/rubymotion/require_override.rb +9 -0
  67. data/lib/rubymotion/version.rb +1 -1
  68. data/spec/{helpers → motion-kramdown/_helpers}/it_behaves_like.rb +0 -0
  69. data/spec/{helpers → motion-kramdown/_helpers}/option_file.rb +2 -2
  70. data/spec/{helpers → motion-kramdown/_helpers}/tidy.rb +0 -0
  71. data/spec/motion-kramdown/bench_mark.rb +37 -0
  72. data/spec/{document_tree.rb → motion-kramdown/document_tree.rb} +11 -1
  73. data/spec/{gfm_to_html.rb → motion-kramdown/gfm_to_html.rb} +51 -18
  74. data/spec/{html_to_html.rb → motion-kramdown/html_to_html.rb} +27 -9
  75. data/spec/{html_to_kramdown_to_html.rb → motion-kramdown/html_to_kramdown_to_html.rb} +35 -16
  76. data/spec/motion-kramdown/kramdown_to_xxx.rb +75 -0
  77. data/spec/{test_location.rb → motion-kramdown/test_location.rb} +0 -0
  78. data/spec/{test_string_scanner_kramdown.rb → motion-kramdown/test_string_scanner_kramdown.rb} +0 -0
  79. data/spec/motion-kramdown/text_manpage.rb +11 -0
  80. data/spec/{text_to_kramdown_to_html.rb → motion-kramdown/text_to_kramdown_to_html.rb} +30 -19
  81. data/spec/{text_to_latex.rb → motion-kramdown/text_to_latex.rb} +0 -0
  82. data/spec/{helpers/spec_options.rb → spec_helper.rb} +13 -2
  83. metadata +54 -33
  84. data/lib/kramdown/compatibility.rb +0 -36
  85. data/spec/bench_mark.rb +0 -43
  86. data/spec/kramdown_to_xxx.rb +0 -42
@@ -5,32 +5,51 @@ describe "html-to-kramdown-to-html conversion" do
5
5
  warn("Skipping html-to-kramdown-to-html tests because tidy executable is missing")
6
6
  else
7
7
  EXCLUDE_HTML_KD_FILES = [
8
- 'test/testcases/span/extension/options.html', # bc of parse_span_html option
9
- 'test/testcases/span/05_html/normal.html', # bc of br tag before closing p tag
10
- 'test/testcases/block/12_extension/nomarkdown.html', # bc of nomarkdown extension
8
+ 'test/testcases/block/04_header/with_auto_ids.html', # bc of auto_ids=true option
9
+ 'test/testcases/block/04_header/header_type_offset.html', # bc of header_offset option
10
+ 'test/testcases/block/06_codeblock/whitespace.html', # bc of entity to char conversion
11
+ 'test/testcases/block/06_codeblock/rouge/simple.html', # bc of double surrounding <div>
12
+ 'test/testcases/block/06_codeblock/rouge/multiple.html', # bc of double surrounding <div>
11
13
  'test/testcases/block/09_html/simple.html', # bc of webgen:block elements
12
14
  'test/testcases/block/09_html/markdown_attr.html', # bc of markdown attr
13
15
  'test/testcases/block/09_html/html_to_native/table_simple.html', # bc of invalidly converted simple table
14
- 'test/testcases/block/06_codeblock/whitespace.html', # bc of entity to char conversion
15
- 'test/testcases/block/06_codeblock/highlighting-rouge.html', # bc of double surrounding <div>
16
+ 'test/testcases/block/09_html/xml.html', # bc of tidy
16
17
  'test/testcases/block/11_ial/simple.html', # bc of change of ordering of attributes in header
17
- 'test/testcases/span/03_codespan/highlighting.html', # bc of span elements inside code element
18
- 'test/testcases/block/04_header/with_auto_ids.html', # bc of auto_ids=true option
19
- 'test/testcases/block/04_header/header_type_offset.html', # bc of header_offset option
20
- 'test/testcases/block/16_toc/toc_exclude.html', # bc of different attribute ordering
21
- 'test/testcases/span/autolinks/url_links.html', # bc of quot entity being converted to char
22
- ('test/testcases/span/03_codespan/highlighting-rouge.html' if RUBY_VERSION < '2.0'),
18
+ 'test/testcases/block/12_extension/nomarkdown.html', # bc of nomarkdown extension
23
19
  'test/testcases/block/15_math/ritex.html', # bc of tidy
24
- 'test/testcases/span/math/ritex.html', # bc of tidy
25
20
  'test/testcases/block/15_math/itex2mml.html', # bc of tidy
26
- 'test/testcases/span/math/itex2mml.html', # bc of tidy
27
21
  'test/testcases/block/15_math/mathjax_preview.html', # bc of mathjax preview
28
22
  'test/testcases/block/15_math/mathjax_preview_simple.html', # bc of mathjax preview
29
- 'test/testcases/span/01_link/link_defs_with_ial.html', # bc of attribute ordering
30
-
31
- 'testcases/block/15_math/gh_128.html', # bc no math support yet
23
+ 'test/testcases/block/15_math/mathjax_preview_as_code.html', # bc no math support yet
24
+ 'test/testcases/block/15_math/gh_128.html', # bc no math support yet
32
25
  'test/testcases/block/15_math/normal.html', # bc no math support yet
26
+ 'test/testcases/block/16_toc/toc_exclude.html', # bc of different attribute ordering
27
+
28
+ 'test/testcases/span/01_link/link_defs_with_ial.html', # bc of attribute ordering
29
+ 'test/testcases/span/03_codespan/highlighting.html', # bc of span elements inside code element
30
+ ('test/testcases/span/03_codespan/rouge/simple.html' if RUBY_VERSION < '2.0'),
31
+ 'test/testcases/span/05_html/normal.html', # bc of br tag before closing p tag
32
+ 'test/testcases/span/05_html/mark_element.html', # bc of tidy
33
+ 'test/testcases/span/05_html/xml.html', # bc of tidy
34
+ 'test/testcases/span/autolinks/url_links.html', # bc of quot entity being converted to char
35
+ 'test/testcases/span/extension/options.html', # bc of parse_span_html option
36
+ 'test/testcases/span/math/ritex.html', # bc of tidy
37
+ 'test/testcases/span/math/itex2mml.html', # bc of tidy
38
+ 'test/testcases/span/math/mathjaxnode.html', # bc of tidy
33
39
  'test/testcases/span/math/normal.html', # bc no math support yet
40
+
41
+ 'test/testcases/span/abbreviations/in_footnote.html', # bc of issue with nbsp
42
+ 'test/testcases/block/16_toc/toc_with_footnotes.html', # bc of issue with nbsp
43
+ 'test/testcases/block/12_extension/options.html', # bc of issue with nbsp
44
+ 'test/testcases/block/12_extension/options2.html', # bc of issue with nbsp
45
+ 'test/testcases/span/04_footnote/footnote_nr.html', # bc of issue with nbsp
46
+ 'test/testcases/span/04_footnote/inside_footnote.html', # bc of issue with nbsp
47
+ 'test/testcases/span/04_footnote/backlink_text.html', # bc of issue with nbsp
48
+
49
+ 'test/testcases/span/math/sskatex.html', # bc of tidy
50
+ 'test/testcases/block/15_math/sskatex.html', # bc of tidy
51
+
52
+ 'test/testcases/span/04_footnote/backlink_inline.html', # bc no math support yet
34
53
  ].compact
35
54
 
36
55
  Dir["#{focus_files(testcase_dir)}.{html,html.19}"].each do |html_file|
@@ -0,0 +1,75 @@
1
+ describe "kramdown-to-xxx conversion" do
2
+
3
+ MATHJAX_NODE_AVAILABLE = begin
4
+ require 'kramdown/converter/math_engine/mathjaxnode'
5
+ Kramdown::Converter::MathEngine::MathjaxNode::AVAILABLE or
6
+ warn("Skipping MathjaxNode tests as MathjaxNode is not available")
7
+ end
8
+
9
+ KATEX_AVAILABLE = begin
10
+ / class="katex"/ === Kramdown::Document.
11
+ new('$$a$$', {:math_engine => :sskatex}).to_html or
12
+ warn("Skipping SsKaTeX tests as SsKaTeX is not available.")
13
+ rescue
14
+ warn("Skipping SsKaTeX tests as default SsKaTeX config does not work.")
15
+ end or warn("Run \"rake dev:test_sskatex_deps\" to see why.")
16
+
17
+ EXCLUDE_FILES = [
18
+ 'test/testcases/block/04_header/with_auto_ids.text', # bc no transliteration support yet
19
+ 'test/testcases/block/06_codeblock/highlighting-opts.text', # bc no highlight support yet
20
+ 'test/testcases/block/06_codeblock/rouge/simple.text', # bc no highlight support yet
21
+ 'test/testcases/block/06_codeblock/rouge/multiple.text', # bc no highlight support yet
22
+ 'test/testcases/block/06_codeblock/highlighting.text', # bc no highlight support yet
23
+ 'test/testcases/block/06_codeblock/highlighting-minted.text', # bc no highlight support yet
24
+ 'test/testcases/block/06_codeblock/highlighting-minted-with-opts.text', # bc no highlight support yet
25
+ 'test/testcases/block/12_extension/options3.text', # bc no highlight support yet
26
+ 'test/testcases/block/15_math/gh_128.text', # bc no math support yet
27
+ 'test/testcases/block/15_math/itex2mml.text', # bc no math support yet
28
+ 'test/testcases/block/15_math/normal.text', # bc no math support yet
29
+ 'test/testcases/block/15_math/ritex.text', # bc no math support yet
30
+ 'test/testcases/block/15_math/mathjax_preview.text', # bc no math support yet
31
+ 'test/testcases/block/15_math/mathjax_preview_simple.text', # bc no math support yet
32
+ 'test/testcases/block/15_math/mathjax_preview_as_code.text', # bc no math support yet
33
+ 'test/testcases/block/15_math/mathjaxnode_notexhints.text', # bc no math support yet
34
+ 'test/testcases/block/15_math/mathjaxnode_semantics.text', # bc no math support yet
35
+ 'test/testcases/block/15_math/mathjaxnode.text', # bc no math support yet
36
+
37
+ 'test/testcases/span/math/itex2mml.text', # bc no math support yet
38
+ 'test/testcases/span/math/mathjaxnode.text', # bc no math support yet
39
+ 'test/testcases/span/math/normal.text', # bc no math support yet
40
+ 'test/testcases/span/math/ritex.text', # bc no math support yet
41
+ 'test/testcases/span/03_codespan/rouge/simple.text', # bc no highlight support yet
42
+ 'test/testcases/span/03_codespan/highlighting.text', # bc no highlight support yet
43
+ 'test/testcases/span/03_codespan/highlighting-minted.text', # bc no highlight support yet
44
+
45
+ ('test/testcases/block/15_math/mathjaxnode.text' unless MATHJAX_NODE_AVAILABLE),
46
+ ('test/testcases/block/15_math/mathjaxnode_notexhints.text' unless MATHJAX_NODE_AVAILABLE),
47
+ ('test/testcases/block/15_math/mathjaxnode_semantics.text' unless MATHJAX_NODE_AVAILABLE),
48
+ ('test/testcases/span/math/mathjaxnode.text' unless MATHJAX_NODE_AVAILABLE),
49
+ ('test/testcases/block/15_math/sskatex.text' unless KATEX_AVAILABLE),
50
+ ('test/testcases/span/math/sskatex.text' unless KATEX_AVAILABLE),
51
+
52
+ 'test/testcases/span/04_footnote/backlink_inline.text', # bc no math support yet
53
+ ].compact
54
+
55
+ Dir["#{focus_files(testcase_dir)}.text"].each do |text_file|
56
+ next if EXCLUDE_FILES.any? {|f| text_file =~ /#{f}$/}
57
+ base_name = text_file.sub(/\.text$/, '')
58
+ html_file = text_file.sub('.text', '.html')
59
+ opts_file = text_file.sub(/\.text$/, '.options')
60
+
61
+ (Dir[base_name + ".*"] - [text_file, opts_file]).each do |output_file|
62
+ output_format = convert_to_format(output_file)
63
+ next unless converter_supported?(output_format)
64
+ next if skip_file_ruby_19?(output_file)
65
+
66
+ it "#{short_name(text_file)} --> #{output_format}" do
67
+ options = load_options(opts_file)
68
+ doc = Kramdown::Document.new(File.read(text_file), options)
69
+ expect(doc.send("to_#{output_format}")).to eq File.read(output_file)
70
+ end
71
+ end
72
+ end
73
+
74
+ end
75
+
@@ -0,0 +1,11 @@
1
+ describe "text-manpage conversion" do
2
+ Dir["#{focus_files(testcase_dir('testcases/man'))}.text"].each do |text_file|
3
+ man_file = text_file.sub(/\.text$/, '.man')
4
+ next unless File.exist?(man_file)
5
+
6
+ it "#{short_name(text_file)} --> manpage" do
7
+ doc = Kramdown::Document.new(File.read(text_file))
8
+ expect(File.read(man_file)).to eq doc.to_man
9
+ end
10
+ end
11
+ end
@@ -5,39 +5,50 @@ describe "text-to-kramdown-to-html conversion" do
5
5
  warn("Skipping text->kramdown->html tests because tidy executable is missing")
6
6
  else
7
7
  EXCLUDE_TEXT_FILES = [
8
- 'test/testcases/span/05_html/markdown_attr.text', # bc of markdown attr
9
- 'test/testcases/block/09_html/markdown_attr.text', # bc of markdown attr
10
- 'test/testcases/span/extension/options.text', # bc of parse_span_html option
11
- 'test/testcases/block/12_extension/options.text', # bc of options option
12
- 'test/testcases/block/12_extension/options3.text', # bc of options option
8
+ 'test/testcases/block/04_header/header_type_offset.text', # bc of header_offset being applied twice
9
+ ('test/testcases/block/04_header/with_auto_ids.text' if RUBY_VERSION <= '1.8.6'), # bc of dep stringex not working
10
+ 'test/testcases/block/04_header/with_auto_ids.text', # bc no transliteration support yet
11
+ ('test/testcases/block/06_codeblock/rouge/simple.text' if RUBY_VERSION < '2.0'), #bc of rouge
12
+ ('test/testcases/block/06_codeblock/rouge/multiple.text' if RUBY_VERSION < '2.0'), #bc of rouge
13
+ 'test/testcases/block/06_codeblock/highlighting-opts.text', # bc no highlight support yet
14
+ 'test/testcases/block/06_codeblock/highlighting.text', # bc no highlight support yet
13
15
  'test/testcases/block/09_html/content_model/tables.text', # bc of parse_block_html option
14
16
  'test/testcases/block/09_html/html_to_native/header.text', # bc of auto_ids option that interferes
15
17
  'test/testcases/block/09_html/html_to_native/table_simple.text', # bc of tr style attr getting removed
18
+ 'test/testcases/block/09_html/markdown_attr.text', # bc of markdown attr
16
19
  'test/testcases/block/09_html/simple.text', # bc of webgen:block elements
20
+ 'test/testcases/block/09_html/xml.text', # bc of tidy
17
21
  'test/testcases/block/11_ial/simple.text', # bc of change of ordering of attributes in header
18
- 'test/testcases/span/extension/comment.text', # bc of comment text modifications (can this be avoided?)
19
- 'test/testcases/block/04_header/header_type_offset.text', # bc of header_offset being applied twice
20
- ('test/testcases/block/04_header/with_auto_ids.text' if RUBY_VERSION <= '1.8.6'), # bc of dep stringex not working
21
- ('test/testcases/span/03_codespan/highlighting-rouge.text' if RUBY_VERSION < '2.0'),
22
- ('test/testcases/block/06_codeblock/highlighting-rouge.text' if RUBY_VERSION < '2.0'), #bc of rouge
23
- 'test/testcases/block/15_math/ritex.text', # bc of tidy
24
- 'test/testcases/span/math/ritex.text', # bc of tidy
22
+ 'test/testcases/block/12_extension/options.text', # bc of options option
23
+ 'test/testcases/block/12_extension/options3.text', # bc of options option
25
24
  'test/testcases/block/15_math/itex2mml.text', # bc of tidy
26
- 'test/testcases/span/math/itex2mml.text', # bc of tidy
27
- 'test/testcases/span/01_link/link_defs_with_ial.text', # bc of attribute ordering
28
-
29
- 'test/testcases/block/04_header/with_auto_ids.text', # bc no transliteration support yet
30
- 'test/testcases/block/06_codeblock/highlighting-opts.text', # bc no highlight support yet
31
- 'test/testcases/block/06_codeblock/highlighting.text', # bc no highlight support yet
25
+ 'test/testcases/block/15_math/ritex.text', # bc of tidy
32
26
  'test/testcases/block/15_math/gh_128.text', # bc no math support yet
33
27
  'test/testcases/block/15_math/normal.text', # bc no math support yet
34
28
  'test/testcases/block/15_math/mathjax_preview.text', # bc no math support yet
35
29
  'test/testcases/block/15_math/mathjax_preview_simple.text', # bc no math support yet
30
+ 'test/testcases/block/15_math/mathjax_preview_as_code.text', # bc no math support yet
31
+ 'test/testcases/block/15_math/mathjaxnode_notexhints.text', # bc no math support yet
32
+ 'test/testcases/block/15_math/mathjaxnode_semantics.text', # bc no math support yet
33
+ 'test/testcases/block/15_math/mathjaxnode.text', # bc no math support yet
34
+
35
+ 'test/testcases/span/01_link/link_defs_with_ial.text', # bc of attribute ordering
36
36
  'test/testcases/span/03_codespan/highlighting.text', # bc no highlight support yet
37
+ ('test/testcases/span/03_codespan/rouge/simple.text' if RUBY_VERSION < '2.0'),
38
+ 'test/testcases/span/05_html/markdown_attr.text', # bc of markdown attr
39
+ 'test/testcases/span/05_html/xml.text', # bc of tidy
40
+ 'test/testcases/span/extension/options.text', # bc of parse_span_html option
41
+ 'test/testcases/span/extension/comment.text', # bc of comment text modifications (can this be avoided?)
42
+ 'test/testcases/span/math/itex2mml.text', # bc of tidy
43
+ 'test/testcases/span/math/mathjaxnode.text', # bc no math support yet
37
44
  'test/testcases/span/math/normal.text', # bc no math support yet
45
+ 'test/testcases/span/math/ritex.text', # bc of tidy
38
46
 
47
+ 'test/testcases/block/15_math/sskatex.text', # bc of tidy
48
+ 'test/testcases/span/math/sskatex.text', # bc of tidy
49
+ 'test/testcases/span/04_footnote/backlink_inline.text', # bc no math support yet
39
50
  ].compact
40
-
51
+
41
52
  Dir["#{focus_files(testcase_dir)}.text"].each do |text_file|
42
53
  next if EXCLUDE_TEXT_FILES.any? {|f| text_file =~ /#{f}$/}
43
54
  html_file = text_file.sub(/\.text$/, '.html')
@@ -4,7 +4,6 @@
4
4
  # rake spec files=foo_spec filter="name of spec"
5
5
  # rake spec filter_context="this doesn't work yet" # To filter by context name (doesn't work until MacBacon implements it)
6
6
  # rake spec hide_backtraces=yes # Hide backtraces
7
- # rake spec focus=block/03_paragraph # Focus on only certain testcase files
8
7
 
9
8
 
10
9
  # From http://chen.do/blog/2013/06/03/running-individual-specs-with-rubymotion/
@@ -34,4 +33,16 @@ silence_warnings do
34
33
 
35
34
  Backtraces = false if ENV['hide_backtraces']
36
35
  end
37
- end
36
+ end
37
+
38
+ #------------------------------------------------------------------------------
39
+ # TODO total hack - without this, the `bacon-expect` gem doesn't get used, and
40
+ # On iOS I get errors like
41
+ # *** Terminating app due to uncaught exception 'NameError', reason: '.../bacon-expect/lib/bacon-expect/matchers/eql.rb:2:in `<main>: uninitialized constant BaconExpect::Matcher::SingleMethod (NameError)
42
+ # and on macOS it only show up as `*nil description*`
43
+ module BaconExpect
44
+ module Matcher
45
+ class SingleMethod
46
+ end
47
+ end
48
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-kramdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 1.16.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Walker
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-03-07 00:00:00.000000000 Z
12
+ date: 2020-07-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: motion-strscan
@@ -39,6 +39,20 @@ dependencies:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
41
  version: '1.4'
42
+ - !ruby/object:Gem::Dependency
43
+ name: motion-expect
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '2.0'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: '2.0'
42
56
  description: The kramdown parser for Markdown, for use with RubyMotion on iOS and
43
57
  OS X.
44
58
  email:
@@ -50,19 +64,23 @@ extra_rdoc_files: []
50
64
  files:
51
65
  - README.md
52
66
  - lib/kramdown.rb
53
- - lib/kramdown/compatibility.rb
54
67
  - lib/kramdown/converter.rb
55
68
  - lib/kramdown/converter/base.rb
69
+ - lib/kramdown/converter/hash_ast.rb
56
70
  - lib/kramdown/converter/html.rb
57
71
  - lib/kramdown/converter/kramdown.rb
58
72
  - lib/kramdown/converter/latex.rb
73
+ - lib/kramdown/converter/man.rb
59
74
  - lib/kramdown/converter/math_engine/itex2mml.rb
60
75
  - lib/kramdown/converter/math_engine/mathjax.rb
76
+ - lib/kramdown/converter/math_engine/mathjaxnode.rb
61
77
  - lib/kramdown/converter/math_engine/ritex.rb
78
+ - lib/kramdown/converter/math_engine/sskatex.rb
62
79
  - lib/kramdown/converter/pdf.rb
63
80
  - lib/kramdown/converter/remove_html_tags.rb
64
81
  - lib/kramdown/converter/syntax_highlighter.rb
65
82
  - lib/kramdown/converter/syntax_highlighter/coderay.rb
83
+ - lib/kramdown/converter/syntax_highlighter/minted.rb
66
84
  - lib/kramdown/converter/syntax_highlighter/rouge.rb
67
85
  - lib/kramdown/converter/toc.rb
68
86
  - lib/kramdown/document.rb
@@ -103,29 +121,32 @@ files:
103
121
  - lib/kramdown/utils/configurable.rb
104
122
  - lib/kramdown/utils/entities.rb
105
123
  - lib/kramdown/utils/html.rb
124
+ - lib/kramdown/utils/lru_cache.rb
106
125
  - lib/kramdown/utils/ordered_hash.rb
107
126
  - lib/kramdown/utils/string_scanner.rb
108
127
  - lib/kramdown/utils/unidecoder.rb
109
128
  - lib/kramdown/version.rb
110
129
  - lib/motion-kramdown.rb
111
130
  - lib/rubymotion/encodings.rb
131
+ - lib/rubymotion/require_override.rb
112
132
  - lib/rubymotion/rexml_shim.rb
113
133
  - lib/rubymotion/set.rb
114
134
  - lib/rubymotion/version.rb
115
- - spec/bench_mark.rb
116
- - spec/document_tree.rb
117
- - spec/gfm_to_html.rb
118
- - spec/helpers/it_behaves_like.rb
119
- - spec/helpers/option_file.rb
120
- - spec/helpers/spec_options.rb
121
- - spec/helpers/tidy.rb
122
- - spec/html_to_html.rb
123
- - spec/html_to_kramdown_to_html.rb
124
- - spec/kramdown_to_xxx.rb
125
- - spec/test_location.rb
126
- - spec/test_string_scanner_kramdown.rb
127
- - spec/text_to_kramdown_to_html.rb
128
- - spec/text_to_latex.rb
135
+ - spec/motion-kramdown/_helpers/it_behaves_like.rb
136
+ - spec/motion-kramdown/_helpers/option_file.rb
137
+ - spec/motion-kramdown/_helpers/tidy.rb
138
+ - spec/motion-kramdown/bench_mark.rb
139
+ - spec/motion-kramdown/document_tree.rb
140
+ - spec/motion-kramdown/gfm_to_html.rb
141
+ - spec/motion-kramdown/html_to_html.rb
142
+ - spec/motion-kramdown/html_to_kramdown_to_html.rb
143
+ - spec/motion-kramdown/kramdown_to_xxx.rb
144
+ - spec/motion-kramdown/test_location.rb
145
+ - spec/motion-kramdown/test_string_scanner_kramdown.rb
146
+ - spec/motion-kramdown/text_manpage.rb
147
+ - spec/motion-kramdown/text_to_kramdown_to_html.rb
148
+ - spec/motion-kramdown/text_to_latex.rb
149
+ - spec/spec_helper.rb
129
150
  homepage: https://github.com/digitalmoksha/motion-kramdown
130
151
  licenses:
131
152
  - MIT
@@ -145,23 +166,23 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
166
  - !ruby/object:Gem::Version
146
167
  version: '0'
147
168
  requirements: []
148
- rubyforge_project:
149
- rubygems_version: 2.4.5
169
+ rubygems_version: 3.0.6
150
170
  signing_key:
151
171
  specification_version: 4
152
172
  summary: RubyMotion version of kramdown parser for Markdown
153
173
  test_files:
154
- - spec/bench_mark.rb
155
- - spec/document_tree.rb
156
- - spec/gfm_to_html.rb
157
- - spec/helpers/it_behaves_like.rb
158
- - spec/helpers/option_file.rb
159
- - spec/helpers/spec_options.rb
160
- - spec/helpers/tidy.rb
161
- - spec/html_to_html.rb
162
- - spec/html_to_kramdown_to_html.rb
163
- - spec/kramdown_to_xxx.rb
164
- - spec/test_location.rb
165
- - spec/test_string_scanner_kramdown.rb
166
- - spec/text_to_kramdown_to_html.rb
167
- - spec/text_to_latex.rb
174
+ - spec/spec_helper.rb
175
+ - spec/motion-kramdown/text_manpage.rb
176
+ - spec/motion-kramdown/_helpers/tidy.rb
177
+ - spec/motion-kramdown/_helpers/it_behaves_like.rb
178
+ - spec/motion-kramdown/_helpers/option_file.rb
179
+ - spec/motion-kramdown/test_location.rb
180
+ - spec/motion-kramdown/html_to_html.rb
181
+ - spec/motion-kramdown/gfm_to_html.rb
182
+ - spec/motion-kramdown/html_to_kramdown_to_html.rb
183
+ - spec/motion-kramdown/bench_mark.rb
184
+ - spec/motion-kramdown/test_string_scanner_kramdown.rb
185
+ - spec/motion-kramdown/document_tree.rb
186
+ - spec/motion-kramdown/kramdown_to_xxx.rb
187
+ - spec/motion-kramdown/text_to_kramdown_to_html.rb
188
+ - spec/motion-kramdown/text_to_latex.rb
@@ -1,36 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- #--
4
- # Copyright (C) 2009-2015 Thomas Leitner <t_leitner@gmx.at>
5
- #
6
- # This file is part of kramdown which is licensed under the MIT.
7
- #++
8
- #
9
- # All the code in this file is backported from Ruby 1.8.7 sothat kramdown works under 1.8.5
10
- #
11
- # :stopdoc:
12
-
13
- if RUBY_VERSION <= '1.8.6'
14
- # RM require 'rexml/parsers/baseparser'
15
- module REXML
16
- module Parsers
17
- class BaseParser
18
- UNAME_STR= "(?:#{NCNAME_STR}:)?#{NCNAME_STR}" unless const_defined?(:UNAME_STR)
19
- end
20
- end
21
- end
22
-
23
- if !String.instance_methods.include?("start_with?")
24
-
25
- class String
26
- def start_with?(str)
27
- self[0, str.length] == str
28
- end
29
- def end_with?(str)
30
- self[-str.length, str.length] == str
31
- end
32
- end
33
-
34
- end
35
-
36
- end
@@ -1,43 +0,0 @@
1
- # Hoedown flags
2
- # ------------------------------------------------------------------------------
3
- FLAGS = HOEDOWN_EXT_TABLES | HOEDOWN_EXT_FENCED_CODE | HOEDOWN_EXT_FOOTNOTES |
4
- HOEDOWN_EXT_AUTOLINK | HOEDOWN_EXT_STRIKETHROUGH | HOEDOWN_EXT_HIGHLIGHT |
5
- HOEDOWN_EXT_SUPERSCRIPT | HOEDOWN_EXT_MATH | HOEDOWN_EXT_NO_INTRA_EMPHASIS
6
-
7
- runs = 10
8
- files = ['mdsyntax.text', 'mdbasics.text']
9
- benchmark_dir = File.join(File.dirname(__FILE__), '../benchmark')
10
-
11
- puts
12
- puts "Running tests on #{Time.now.strftime("%Y-%m-%d")} under #{RUBY_DESCRIPTION}"
13
-
14
- files.each do |file|
15
- data = File.read(File.join(benchmark_dir, file))
16
- puts
17
- puts "==> Test using file #{file} and #{runs} runs"
18
-
19
- # results = Benchmark.bmbm do |b|
20
- results = Benchmark.bm do |b|
21
- b.report("kramdown #{Kramdown::VERSION}") { runs.times { Kramdown::Document.new(data).to_html } }
22
- b.report(" hoedown 3.0.1") do
23
- runs.times do
24
- document = HoedownDocument.new
25
- document.initWithHtmlRendererWithFlags(FLAGS)
26
- html = document.renderMarkdownString(data)
27
- end
28
- end
29
- end
30
-
31
- # puts
32
- # puts "Real time of X divided by real time of kramdown"
33
- # kd = results.shift.real
34
- # %w[hoedown].each do |name|
35
- # puts name.ljust(19) << (results.shift.real/kd).round(4).to_s
36
- # end
37
- end
38
-
39
- describe "Benchmark Test" do
40
- it "benchmarks with mdsyntax.text and mdbasics.text" do
41
- expect(true).to eq true
42
- end
43
- end