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.
- checksums.yaml +5 -5
- data/README.md +6 -2
- data/lib/kramdown.rb +1 -1
- data/lib/kramdown/converter.rb +10 -11
- data/lib/kramdown/converter/base.rb +19 -12
- data/lib/kramdown/converter/hash_ast.rb +38 -0
- data/lib/kramdown/converter/html.rb +71 -39
- data/lib/kramdown/converter/kramdown.rb +19 -10
- data/lib/kramdown/converter/latex.rb +28 -10
- data/lib/kramdown/converter/man.rb +303 -0
- data/lib/kramdown/converter/math_engine/itex2mml.rb +2 -2
- data/lib/kramdown/converter/math_engine/mathjax.rb +13 -3
- data/lib/kramdown/converter/math_engine/mathjaxnode.rb +56 -0
- data/lib/kramdown/converter/math_engine/ritex.rb +2 -2
- data/lib/kramdown/converter/math_engine/sskatex.rb +97 -0
- data/lib/kramdown/converter/pdf.rb +6 -6
- data/lib/kramdown/converter/remove_html_tags.rb +5 -3
- data/lib/kramdown/converter/syntax_highlighter.rb +5 -2
- data/lib/kramdown/converter/syntax_highlighter/coderay.rb +8 -5
- data/lib/kramdown/converter/syntax_highlighter/minted.rb +35 -0
- data/lib/kramdown/converter/syntax_highlighter/rouge.rb +48 -10
- data/lib/kramdown/converter/toc.rb +2 -2
- data/lib/kramdown/document.rb +16 -19
- data/lib/kramdown/element.rb +5 -1
- data/lib/kramdown/error.rb +1 -1
- data/lib/kramdown/options.rb +103 -7
- data/lib/kramdown/parser.rb +1 -1
- data/lib/kramdown/parser/base.rb +12 -18
- data/lib/kramdown/parser/gfm.rb +142 -11
- data/lib/kramdown/parser/html.rb +28 -18
- data/lib/kramdown/parser/kramdown.rb +45 -36
- data/lib/kramdown/parser/kramdown/abbreviation.rb +1 -1
- data/lib/kramdown/parser/kramdown/autolink.rb +2 -8
- data/lib/kramdown/parser/kramdown/blank_line.rb +2 -2
- data/lib/kramdown/parser/kramdown/block_boundary.rb +4 -4
- data/lib/kramdown/parser/kramdown/blockquote.rb +4 -4
- data/lib/kramdown/parser/kramdown/codeblock.rb +11 -8
- data/lib/kramdown/parser/kramdown/codespan.rb +1 -1
- data/lib/kramdown/parser/kramdown/emphasis.rb +2 -2
- data/lib/kramdown/parser/kramdown/eob.rb +1 -1
- data/lib/kramdown/parser/kramdown/escaped_chars.rb +1 -1
- data/lib/kramdown/parser/kramdown/extensions.rb +6 -3
- data/lib/kramdown/parser/kramdown/footnote.rb +4 -5
- data/lib/kramdown/parser/kramdown/header.rb +2 -2
- data/lib/kramdown/parser/kramdown/horizontal_rule.rb +1 -1
- data/lib/kramdown/parser/kramdown/html.rb +8 -8
- data/lib/kramdown/parser/kramdown/html_entity.rb +2 -2
- data/lib/kramdown/parser/kramdown/line_break.rb +1 -1
- data/lib/kramdown/parser/kramdown/link.rb +5 -4
- data/lib/kramdown/parser/kramdown/list.rb +17 -10
- data/lib/kramdown/parser/kramdown/math.rb +2 -2
- data/lib/kramdown/parser/kramdown/paragraph.rb +19 -8
- data/lib/kramdown/parser/kramdown/smart_quotes.rb +3 -3
- data/lib/kramdown/parser/kramdown/table.rb +10 -12
- data/lib/kramdown/parser/kramdown/typographic_symbol.rb +1 -1
- data/lib/kramdown/parser/markdown.rb +2 -2
- data/lib/kramdown/utils.rb +2 -1
- data/lib/kramdown/utils/configurable.rb +2 -2
- data/lib/kramdown/utils/entities.rb +1 -1
- data/lib/kramdown/utils/html.rb +2 -2
- data/lib/kramdown/utils/lru_cache.rb +40 -0
- data/lib/kramdown/utils/ordered_hash.rb +2 -71
- data/lib/kramdown/utils/string_scanner.rb +2 -2
- data/lib/kramdown/utils/unidecoder.rb +2 -2
- data/lib/kramdown/version.rb +2 -2
- data/lib/rubymotion/require_override.rb +9 -0
- data/lib/rubymotion/version.rb +1 -1
- data/spec/{helpers → motion-kramdown/_helpers}/it_behaves_like.rb +0 -0
- data/spec/{helpers → motion-kramdown/_helpers}/option_file.rb +2 -2
- data/spec/{helpers → motion-kramdown/_helpers}/tidy.rb +0 -0
- data/spec/motion-kramdown/bench_mark.rb +37 -0
- data/spec/{document_tree.rb → motion-kramdown/document_tree.rb} +11 -1
- data/spec/{gfm_to_html.rb → motion-kramdown/gfm_to_html.rb} +51 -18
- data/spec/{html_to_html.rb → motion-kramdown/html_to_html.rb} +27 -9
- data/spec/{html_to_kramdown_to_html.rb → motion-kramdown/html_to_kramdown_to_html.rb} +35 -16
- data/spec/motion-kramdown/kramdown_to_xxx.rb +75 -0
- data/spec/{test_location.rb → motion-kramdown/test_location.rb} +0 -0
- data/spec/{test_string_scanner_kramdown.rb → motion-kramdown/test_string_scanner_kramdown.rb} +0 -0
- data/spec/motion-kramdown/text_manpage.rb +11 -0
- data/spec/{text_to_kramdown_to_html.rb → motion-kramdown/text_to_kramdown_to_html.rb} +30 -19
- data/spec/{text_to_latex.rb → motion-kramdown/text_to_latex.rb} +0 -0
- data/spec/{helpers/spec_options.rb → spec_helper.rb} +13 -2
- metadata +54 -33
- data/lib/kramdown/compatibility.rb +0 -36
- data/spec/bench_mark.rb +0 -43
- data/spec/kramdown_to_xxx.rb +0 -42
data/spec/kramdown_to_xxx.rb
DELETED
@@ -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
|
-
|