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
@@ -1,42 +0,0 @@
1
- describe "kramdown-to-xxx conversion" do
2
-
3
- EXCLUDE_FILES = [
4
- 'test/testcases/block/04_header/with_auto_ids.text', # bc no transliteration support yet
5
- 'test/testcases/block/06_codeblock/highlighting-opts.text', # bc no highlight support yet
6
- 'test/testcases/block/06_codeblock/highlighting-rouge.text', # bc no highlight support yet
7
- 'test/testcases/block/06_codeblock/highlighting.text', # bc no highlight support yet
8
- 'test/testcases/block/12_extension/options3.text', # bc no highlight support yet
9
- 'test/testcases/block/15_math/gh_128.text', # bc no math support yet
10
- 'test/testcases/block/15_math/itex2mml.text', # bc no math support yet
11
- 'test/testcases/block/15_math/normal.text', # bc no math support yet
12
- 'test/testcases/block/15_math/ritex.text', # bc no math support yet
13
- 'test/testcases/block/15_math/mathjax_preview.text', # bc no math support yet
14
- 'test/testcases/block/15_math/mathjax_preview_simple.text', # bc no math support yet
15
- 'test/testcases/span/math/itex2mml.text', # bc no math support yet
16
- 'test/testcases/span/math/normal.text', # bc no math support yet
17
- 'test/testcases/span/math/ritex.text', # bc no math support yet
18
- 'test/testcases/span/03_codespan/highlighting-rouge.text', # bc no highlight support yet
19
- 'test/testcases/span/03_codespan/highlighting.text', # bc no highlight support yet
20
- ].compact
21
-
22
- Dir["#{focus_files(testcase_dir)}.text"].each do |text_file|
23
- next if EXCLUDE_FILES.any? {|f| text_file =~ /#{f}$/}
24
- base_name = text_file.sub(/\.text$/, '')
25
- html_file = text_file.sub('.text', '.html')
26
- opts_file = text_file.sub(/\.text$/, '.options')
27
-
28
- (Dir[base_name + ".*"] - [text_file, opts_file]).each do |output_file|
29
- output_format = convert_to_format(output_file)
30
- next unless converter_supported?(output_format)
31
- next if skip_file_ruby_19?(output_file)
32
-
33
- it "#{short_name(text_file)} --> #{output_format}" do
34
- options = load_options(opts_file)
35
- doc = Kramdown::Document.new(File.read(text_file), options)
36
- expect(doc.send("to_#{output_format}")).to eq File.read(output_file)
37
- end
38
- end
39
- end
40
-
41
- end
42
-