commonmarker 0.23.9 → 1.0.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +70 -212
  3. data/commonmarker.gemspec +34 -31
  4. data/ext/commonmarker/Cargo.toml +12 -0
  5. data/ext/commonmarker/_util.rb +102 -0
  6. data/ext/commonmarker/extconf.rb +4 -5
  7. data/ext/commonmarker/src/comrak_options.rs +107 -0
  8. data/ext/commonmarker/src/lib.rs +27 -0
  9. data/lib/commonmarker/config.rb +57 -38
  10. data/lib/commonmarker/extension.rb +14 -0
  11. data/lib/commonmarker/renderer.rb +1 -127
  12. data/lib/commonmarker/version.rb +2 -2
  13. data/lib/commonmarker.rb +14 -29
  14. metadata +37 -181
  15. data/Rakefile +0 -109
  16. data/bin/commonmarker +0 -118
  17. data/ext/commonmarker/arena.c +0 -104
  18. data/ext/commonmarker/autolink.c +0 -508
  19. data/ext/commonmarker/autolink.h +0 -8
  20. data/ext/commonmarker/blocks.c +0 -1620
  21. data/ext/commonmarker/buffer.c +0 -278
  22. data/ext/commonmarker/buffer.h +0 -116
  23. data/ext/commonmarker/case_fold_switch.inc +0 -4327
  24. data/ext/commonmarker/chunk.h +0 -135
  25. data/ext/commonmarker/cmark-gfm-core-extensions.h +0 -54
  26. data/ext/commonmarker/cmark-gfm-extension_api.h +0 -737
  27. data/ext/commonmarker/cmark-gfm-extensions_export.h +0 -42
  28. data/ext/commonmarker/cmark-gfm.h +0 -833
  29. data/ext/commonmarker/cmark-gfm_export.h +0 -42
  30. data/ext/commonmarker/cmark-gfm_version.h +0 -7
  31. data/ext/commonmarker/cmark.c +0 -55
  32. data/ext/commonmarker/cmark_ctype.c +0 -44
  33. data/ext/commonmarker/cmark_ctype.h +0 -33
  34. data/ext/commonmarker/commonmark.c +0 -514
  35. data/ext/commonmarker/commonmarker.c +0 -1308
  36. data/ext/commonmarker/commonmarker.h +0 -16
  37. data/ext/commonmarker/config.h +0 -76
  38. data/ext/commonmarker/core-extensions.c +0 -27
  39. data/ext/commonmarker/entities.inc +0 -2138
  40. data/ext/commonmarker/ext_scanners.c +0 -879
  41. data/ext/commonmarker/ext_scanners.h +0 -24
  42. data/ext/commonmarker/footnotes.c +0 -63
  43. data/ext/commonmarker/footnotes.h +0 -27
  44. data/ext/commonmarker/houdini.h +0 -57
  45. data/ext/commonmarker/houdini_href_e.c +0 -100
  46. data/ext/commonmarker/houdini_html_e.c +0 -66
  47. data/ext/commonmarker/houdini_html_u.c +0 -149
  48. data/ext/commonmarker/html.c +0 -502
  49. data/ext/commonmarker/html.h +0 -27
  50. data/ext/commonmarker/inlines.c +0 -1788
  51. data/ext/commonmarker/inlines.h +0 -29
  52. data/ext/commonmarker/iterator.c +0 -159
  53. data/ext/commonmarker/iterator.h +0 -26
  54. data/ext/commonmarker/latex.c +0 -468
  55. data/ext/commonmarker/linked_list.c +0 -37
  56. data/ext/commonmarker/man.c +0 -274
  57. data/ext/commonmarker/map.c +0 -129
  58. data/ext/commonmarker/map.h +0 -44
  59. data/ext/commonmarker/node.c +0 -1044
  60. data/ext/commonmarker/node.h +0 -166
  61. data/ext/commonmarker/parser.h +0 -59
  62. data/ext/commonmarker/plaintext.c +0 -218
  63. data/ext/commonmarker/plugin.c +0 -36
  64. data/ext/commonmarker/plugin.h +0 -34
  65. data/ext/commonmarker/references.c +0 -43
  66. data/ext/commonmarker/references.h +0 -26
  67. data/ext/commonmarker/registry.c +0 -63
  68. data/ext/commonmarker/registry.h +0 -24
  69. data/ext/commonmarker/render.c +0 -213
  70. data/ext/commonmarker/render.h +0 -62
  71. data/ext/commonmarker/scanners.c +0 -14056
  72. data/ext/commonmarker/scanners.h +0 -70
  73. data/ext/commonmarker/scanners.re +0 -341
  74. data/ext/commonmarker/strikethrough.c +0 -167
  75. data/ext/commonmarker/strikethrough.h +0 -9
  76. data/ext/commonmarker/syntax_extension.c +0 -149
  77. data/ext/commonmarker/syntax_extension.h +0 -34
  78. data/ext/commonmarker/table.c +0 -872
  79. data/ext/commonmarker/table.h +0 -12
  80. data/ext/commonmarker/tagfilter.c +0 -60
  81. data/ext/commonmarker/tagfilter.h +0 -8
  82. data/ext/commonmarker/tasklist.c +0 -156
  83. data/ext/commonmarker/tasklist.h +0 -8
  84. data/ext/commonmarker/utf8.c +0 -317
  85. data/ext/commonmarker/utf8.h +0 -35
  86. data/ext/commonmarker/xml.c +0 -182
  87. data/lib/commonmarker/node/inspect.rb +0 -47
  88. data/lib/commonmarker/node.rb +0 -83
  89. data/lib/commonmarker/renderer/html_renderer.rb +0 -256
@@ -0,0 +1,27 @@
1
+ extern crate core;
2
+
3
+ use comrak::{markdown_to_html, ComrakOptions};
4
+ use magnus::{define_module, function, r_hash::ForEach, Error, RHash, Symbol};
5
+
6
+ mod comrak_options;
7
+ use comrak_options::iterate_options_hash;
8
+
9
+ fn commonmark_to_html(rb_commonmark: String, rb_options: magnus::RHash) -> String {
10
+ let mut comrak_options = ComrakOptions::default();
11
+
12
+ rb_options.foreach(|key: Symbol, value: RHash| {
13
+ iterate_options_hash(&mut comrak_options, key, value);
14
+ Ok(ForEach::Continue)
15
+ });
16
+
17
+ markdown_to_html(&rb_commonmark, &comrak_options)
18
+ }
19
+
20
+ #[magnus::init]
21
+ fn init() -> Result<(), Error> {
22
+ let module = define_module("Commonmarker")?;
23
+
24
+ module.define_module_function("commonmark_to_html", function!(commonmark_to_html, 2))?;
25
+
26
+ Ok(())
27
+ }
@@ -1,54 +1,73 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module CommonMarker
4
- # For Ruby::Enum, these must be classes, not modules
3
+ module Commonmarker
5
4
  module Config
6
- # See https://github.com/github/cmark-gfm/blob/master/src/cmark-gfm.h#L673
5
+ # For details, see
6
+ # https://github.com/kivikakk/comrak/blob/162ef9354deb2c9b4a4e05be495aa372ba5bb696/src/main.rs#L201
7
7
  OPTS = {
8
8
  parse: {
9
- DEFAULT: 0,
10
- SOURCEPOS: (1 << 1),
11
- UNSAFE: (1 << 17),
12
- VALIDATE_UTF8: (1 << 9),
13
- SMART: (1 << 10),
14
- LIBERAL_HTML_TAG: (1 << 12),
15
- FOOTNOTES: (1 << 13),
16
- STRIKETHROUGH_DOUBLE_TILDE: (1 << 14),
9
+ smart: false,
10
+ default_info_string: "",
17
11
  }.freeze,
18
12
  render: {
19
- DEFAULT: 0,
20
- SOURCEPOS: (1 << 1),
21
- HARDBREAKS: (1 << 2),
22
- UNSAFE: (1 << 17),
23
- NOBREAKS: (1 << 4),
24
- VALIDATE_UTF8: (1 << 9),
25
- SMART: (1 << 10),
26
- GITHUB_PRE_LANG: (1 << 11),
27
- LIBERAL_HTML_TAG: (1 << 12),
28
- FOOTNOTES: (1 << 13),
29
- STRIKETHROUGH_DOUBLE_TILDE: (1 << 14),
30
- TABLE_PREFER_STYLE_ATTRIBUTES: (1 << 15),
31
- FULL_INFO_STRING: (1 << 16),
13
+ hardbreaks: true,
14
+ github_pre_lang: true,
15
+ width: 80,
16
+ unsafe_: false,
17
+ escape: false,
32
18
  }.freeze,
33
- format: [:html, :xml, :commonmark, :plaintext].freeze,
19
+ extension: {
20
+ strikethrough: true,
21
+ tagfilter: true,
22
+ table: true,
23
+ autolink: true,
24
+ tasklist: true,
25
+ superscript: false,
26
+ header_ids: "",
27
+ footnotes: false,
28
+ description_lists: false,
29
+ front_matter_delimiter: "",
30
+ },
31
+ format: [:html].freeze,
34
32
  }.freeze
35
33
 
36
34
  class << self
37
- def process_options(option, type)
38
- case option
39
- when Symbol
40
- OPTS.fetch(type).fetch(option)
41
- when Array
42
- raise TypeError if option.none?
35
+ def merged_with_defaults(options)
36
+ Commonmarker::Config::OPTS.merge(process_options(options))
37
+ end
43
38
 
44
- # neckbearding around. the map will both check the opts and then bitwise-OR it
45
- OPTS.fetch(type).fetch_values(*option).inject(0, :|)
46
- else
47
- raise TypeError, "option type must be a valid symbol or array of symbols within the #{name}::OPTS[:#{type}] context"
48
- end
49
- rescue KeyError => e
50
- raise TypeError, "option ':#{e.key}' does not exist for #{name}::OPTS[:#{type}]"
39
+ def process_options(options)
40
+ {
41
+ parse: process_parse_options(options[:parse]),
42
+ render: process_render_options(options[:render]),
43
+ extension: process_extension_options(options[:extension]),
44
+ }
51
45
  end
52
46
  end
47
+
48
+ BOOLS = [true, false]
49
+ ["parse", "render", "extension"].each do |type|
50
+ define_singleton_method :"process_#{type}_options" do |options|
51
+ Commonmarker::Config::OPTS[type.to_sym].each_with_object({}) do |(key, value), hash|
52
+ if options.nil? # option not provided, go for the default
53
+ hash[key] = value
54
+ next
55
+ end
56
+
57
+ # option explicitly not included, remove it
58
+ next if options[key].nil?
59
+
60
+ value_klass = value.class
61
+ if BOOLS.include?(value) && BOOLS.include?(options[key])
62
+ hash[key] = options[key]
63
+ elsif options[key].is_a?(value_klass)
64
+ hash[key] = options[key]
65
+ else
66
+ expected_type = BOOLS.include?(value) ? "Boolean" : value_klass.to_s
67
+ raise TypeError, "#{type}_options[:#{key}] must be a #{expected_type}; got #{options[key].class}"
68
+ end
69
+ end
70
+ end
71
+ end
53
72
  end
54
73
  end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ begin
4
+ # native precompiled gems package shared libraries in <gem_dir>/lib/commonmarker/<ruby_version>
5
+ # load the precompiled extension file
6
+ ruby_version = /\d+\.\d+/.match(::RUBY_VERSION)
7
+ require_relative "#{ruby_version}/commonmarker"
8
+ rescue LoadError
9
+ # fall back to the extension compiled upon installation.
10
+ # use "require" instead of "require_relative" because non-native gems will place C extension files
11
+ # in Gem::BasicSpecification#extension_dir after compilation (during normal installation), which
12
+ # is in $LOAD_PATH but not necessarily relative to this file (see nokogiri#2300)
13
+ require "commonmarker/commonmarker"
14
+ end
@@ -3,133 +3,7 @@
3
3
  require "set"
4
4
  require "stringio"
5
5
 
6
- module CommonMarker
6
+ module Commonmarker
7
7
  class Renderer
8
- attr_accessor :in_tight, :warnings, :in_plain
9
-
10
- def initialize(options: :DEFAULT, extensions: [])
11
- @opts = Config.process_options(options, :render)
12
- @stream = StringIO.new(+"")
13
- @need_blocksep = false
14
- @warnings = Set.new([])
15
- @in_tight = false
16
- @in_plain = false
17
- @tagfilter = extensions.include?(:tagfilter)
18
- end
19
-
20
- def out(*args)
21
- args.each do |arg|
22
- case arg
23
- when :children
24
- @node.each { |child| out(child) }
25
- when Array
26
- arg.each { |x| render(x) }
27
- when Node
28
- render(arg)
29
- else
30
- @stream.write(arg)
31
- end
32
- end
33
- end
34
-
35
- def render(node)
36
- @node = node
37
- if node.type == :document
38
- document(node)
39
- @stream.string
40
- elsif @in_plain && node.type != :text && node.type != :softbreak
41
- node.each { |child| render(child) }
42
- else
43
- begin
44
- send(node.type, node)
45
- rescue NoMethodError => e
46
- @warnings.add("WARNING: #{node.type} not implemented.")
47
- raise e
48
- end
49
- end
50
- end
51
-
52
- def document(_node)
53
- out(:children)
54
- end
55
-
56
- def code_block(node)
57
- code_block(node)
58
- end
59
-
60
- def reference_def(_node); end
61
-
62
- def cr
63
- return if @stream.string.empty? || @stream.string[-1] == "\n"
64
-
65
- out("\n")
66
- end
67
-
68
- def blocksep
69
- out("\n")
70
- end
71
-
72
- def containersep
73
- cr unless @in_tight
74
- end
75
-
76
- def block
77
- cr
78
- yield
79
- cr
80
- end
81
-
82
- def container(starter, ender)
83
- out(starter)
84
- yield
85
- out(ender)
86
- end
87
-
88
- def plain
89
- old_in_plain = @in_plain
90
- @in_plain = true
91
- yield
92
- @in_plain = old_in_plain
93
- end
94
-
95
- private
96
-
97
- def escape_href(str)
98
- @node.html_escape_href(str)
99
- end
100
-
101
- def escape_html(str)
102
- @node.html_escape_html(str)
103
- end
104
-
105
- def tagfilter(str)
106
- if @tagfilter
107
- str.gsub(
108
- %r{
109
- <
110
- (
111
- title|textarea|style|xmp|iframe|
112
- noembed|noframes|script|plaintext
113
- )
114
- (?=\s|>|/>)
115
- }xi,
116
- '&lt;\1',
117
- )
118
- else
119
- str
120
- end
121
- end
122
-
123
- def sourcepos(node)
124
- return "" unless option_enabled?(:SOURCEPOS)
125
-
126
- s = node.sourcepos
127
- " data-sourcepos=\"#{s[:start_line]}:#{s[:start_column]}-" \
128
- "#{s[:end_line]}:#{s[:end_column]}\""
129
- end
130
-
131
- def option_enabled?(opt)
132
- (@opts & CommonMarker::Config::OPTS.dig(:render, opt)) != 0
133
- end
134
8
  end
135
9
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module CommonMarker
4
- VERSION = "0.23.9"
3
+ module Commonmarker
4
+ VERSION = "1.0.0.pre"
5
5
  end
data/lib/commonmarker.rb CHANGED
@@ -1,45 +1,30 @@
1
- #!/usr/bin/env ruby
2
1
  # frozen_string_literal: true
3
2
 
4
- require "commonmarker/commonmarker"
3
+ require_relative "commonmarker/extension"
4
+
5
5
  require "commonmarker/config"
6
- require "commonmarker/node"
7
6
  require "commonmarker/renderer"
8
- require "commonmarker/renderer/html_renderer"
9
7
  require "commonmarker/version"
10
8
 
11
- begin
9
+ if ENV.fetch("DEBUG", false)
12
10
  require "awesome_print"
13
- rescue LoadError; end # rubocop:disable Lint/SuppressedException
14
- module CommonMarker
11
+ require "debug"
12
+ end
13
+
14
+ module Commonmarker
15
15
  class << self
16
- # Public: Parses a Markdown string into an HTML string.
16
+ # Public: Parses a CommonMark string into an HTML string.
17
17
  #
18
18
  # text - A {String} of text
19
- # option - Either a {Symbol} or {Array of Symbol}s indicating the render options
20
- # extensions - An {Array of Symbol}s indicating the extensions to use
19
+ # option - A {Hash} of render, parse, and extension options to transform the text.
21
20
  #
22
21
  # Returns a {String} of converted HTML.
23
- def render_html(text, options = :DEFAULT, extensions = [])
24
- raise TypeError, "text must be a String; got a #{text.class}!" unless text.is_a?(String)
25
-
26
- opts = Config.process_options(options, :render)
27
- Node.markdown_to_html(text.encode("UTF-8"), opts, extensions)
28
- end
29
-
30
- # Public: Parses a Markdown string into a `document` node.
31
- #
32
- # string - {String} to be parsed
33
- # option - A {Symbol} or {Array of Symbol}s indicating the parse options
34
- # extensions - An {Array of Symbol}s indicating the extensions to use
35
- #
36
- # Returns the `document` node.
37
- def render_doc(text, options = :DEFAULT, extensions = [])
22
+ def to_html(text, options: Commonmarker::Config::OPTS)
38
23
  raise TypeError, "text must be a String; got a #{text.class}!" unless text.is_a?(String)
24
+ raise TypeError, "options must be a Hash; got a #{options.class}!" unless options.is_a?(Hash)
39
25
 
40
- opts = Config.process_options(options, :parse)
41
- text = text.encode("UTF-8")
42
- Node.parse_document(text, text.bytesize, opts, extensions)
26
+ opts = Config.process_options(options)
27
+ commonmark_to_html(text.encode("UTF-8"), opts)
43
28
  end
44
- end
29
+ end
45
30
  end
metadata CHANGED
@@ -1,262 +1,118 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: commonmarker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.9
4
+ version: 1.0.0.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen Torikian
8
8
  - Ashe Connor
9
- autorequire:
10
- bindir: bin
9
+ autorequire:
10
+ bindir: exe
11
11
  cert_chain: []
12
- date: 2023-04-11 00:00:00.000000000 Z
12
+ date: 2022-11-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: awesome_print
15
+ name: rb_sys
16
16
  requirement: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - ">="
19
- - !ruby/object:Gem::Version
20
- version: '0'
21
- type: :development
22
- prerelease: false
23
- version_requirements: !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- version: '0'
28
- - !ruby/object:Gem::Dependency
29
- name: json
30
- requirement: !ruby/object:Gem::Requirement
31
- requirements:
32
- - - "~>"
33
- - !ruby/object:Gem::Version
34
- version: '2.3'
35
- type: :development
36
- prerelease: false
37
- version_requirements: !ruby/object:Gem::Requirement
38
17
  requirements:
39
18
  - - "~>"
40
19
  - !ruby/object:Gem::Version
41
- version: '2.3'
42
- - !ruby/object:Gem::Dependency
43
- name: minitest
44
- requirement: !ruby/object:Gem::Requirement
45
- requirements:
46
- - - "~>"
47
- - !ruby/object:Gem::Version
48
- version: '5.6'
49
- type: :development
20
+ version: '0.9'
21
+ type: :runtime
50
22
  prerelease: false
51
23
  version_requirements: !ruby/object:Gem::Requirement
52
24
  requirements:
53
25
  - - "~>"
54
26
  - !ruby/object:Gem::Version
55
- version: '5.6'
27
+ version: '0.9'
56
28
  - !ruby/object:Gem::Dependency
57
- name: minitest-focus
29
+ name: rake
58
30
  requirement: !ruby/object:Gem::Requirement
59
31
  requirements:
60
32
  - - "~>"
61
33
  - !ruby/object:Gem::Version
62
- version: '1.1'
34
+ version: '13.0'
63
35
  type: :development
64
36
  prerelease: false
65
37
  version_requirements: !ruby/object:Gem::Requirement
66
38
  requirements:
67
39
  - - "~>"
68
40
  - !ruby/object:Gem::Version
69
- version: '1.1'
70
- - !ruby/object:Gem::Dependency
71
- name: rake
72
- requirement: !ruby/object:Gem::Requirement
73
- requirements:
74
- - - ">="
75
- - !ruby/object:Gem::Version
76
- version: '0'
77
- type: :development
78
- prerelease: false
79
- version_requirements: !ruby/object:Gem::Requirement
80
- requirements:
81
- - - ">="
82
- - !ruby/object:Gem::Version
83
- version: '0'
41
+ version: '13.0'
84
42
  - !ruby/object:Gem::Dependency
85
43
  name: rake-compiler
86
44
  requirement: !ruby/object:Gem::Requirement
87
45
  requirements:
88
46
  - - "~>"
89
47
  - !ruby/object:Gem::Version
90
- version: '0.9'
48
+ version: '1.2'
91
49
  type: :development
92
50
  prerelease: false
93
51
  version_requirements: !ruby/object:Gem::Requirement
94
52
  requirements:
95
53
  - - "~>"
96
54
  - !ruby/object:Gem::Version
97
- version: '0.9'
55
+ version: '1.2'
98
56
  - !ruby/object:Gem::Dependency
99
- name: rdoc
57
+ name: rake-compiler-dock
100
58
  requirement: !ruby/object:Gem::Requirement
101
59
  requirements:
102
60
  - - "~>"
103
61
  - !ruby/object:Gem::Version
104
- version: '6.2'
62
+ version: '1.2'
105
63
  type: :development
106
64
  prerelease: false
107
65
  version_requirements: !ruby/object:Gem::Requirement
108
66
  requirements:
109
67
  - - "~>"
110
68
  - !ruby/object:Gem::Version
111
- version: '6.2'
112
- - !ruby/object:Gem::Dependency
113
- name: rubocop
114
- requirement: !ruby/object:Gem::Requirement
115
- requirements:
116
- - - ">="
117
- - !ruby/object:Gem::Version
118
- version: '0'
119
- type: :development
120
- prerelease: false
121
- version_requirements: !ruby/object:Gem::Requirement
122
- requirements:
123
- - - ">="
124
- - !ruby/object:Gem::Version
125
- version: '0'
126
- - !ruby/object:Gem::Dependency
127
- name: rubocop-standard
128
- requirement: !ruby/object:Gem::Requirement
129
- requirements:
130
- - - ">="
131
- - !ruby/object:Gem::Version
132
- version: '0'
133
- type: :development
134
- prerelease: false
135
- version_requirements: !ruby/object:Gem::Requirement
136
- requirements:
137
- - - ">="
138
- - !ruby/object:Gem::Version
139
- version: '0'
140
- description: A fast, safe, extensible parser for CommonMark. This wraps the official
141
- libcmark library.
142
- email:
143
- executables:
144
- - commonmarker
69
+ version: '1.2'
70
+ description: A fast, safe, extensible parser for CommonMark. This wraps the comrak
71
+ Rust crate.
72
+ email:
73
+ executables: []
145
74
  extensions:
146
- - ext/commonmarker/extconf.rb
75
+ - ext/commonmarker/Cargo.toml
147
76
  extra_rdoc_files: []
148
77
  files:
149
78
  - LICENSE.txt
150
79
  - README.md
151
- - Rakefile
152
- - bin/commonmarker
153
80
  - commonmarker.gemspec
154
- - ext/commonmarker/arena.c
155
- - ext/commonmarker/autolink.c
156
- - ext/commonmarker/autolink.h
157
- - ext/commonmarker/blocks.c
158
- - ext/commonmarker/buffer.c
159
- - ext/commonmarker/buffer.h
160
- - ext/commonmarker/case_fold_switch.inc
161
- - ext/commonmarker/chunk.h
162
- - ext/commonmarker/cmark-gfm-core-extensions.h
163
- - ext/commonmarker/cmark-gfm-extension_api.h
164
- - ext/commonmarker/cmark-gfm-extensions_export.h
165
- - ext/commonmarker/cmark-gfm.h
166
- - ext/commonmarker/cmark-gfm_export.h
167
- - ext/commonmarker/cmark-gfm_version.h
168
- - ext/commonmarker/cmark.c
169
- - ext/commonmarker/cmark_ctype.c
170
- - ext/commonmarker/cmark_ctype.h
171
- - ext/commonmarker/commonmark.c
172
- - ext/commonmarker/commonmarker.c
173
- - ext/commonmarker/commonmarker.h
174
- - ext/commonmarker/config.h
175
- - ext/commonmarker/core-extensions.c
176
- - ext/commonmarker/entities.inc
177
- - ext/commonmarker/ext_scanners.c
178
- - ext/commonmarker/ext_scanners.h
81
+ - ext/commonmarker/Cargo.toml
82
+ - ext/commonmarker/_util.rb
179
83
  - ext/commonmarker/extconf.rb
180
- - ext/commonmarker/footnotes.c
181
- - ext/commonmarker/footnotes.h
182
- - ext/commonmarker/houdini.h
183
- - ext/commonmarker/houdini_href_e.c
184
- - ext/commonmarker/houdini_html_e.c
185
- - ext/commonmarker/houdini_html_u.c
186
- - ext/commonmarker/html.c
187
- - ext/commonmarker/html.h
188
- - ext/commonmarker/inlines.c
189
- - ext/commonmarker/inlines.h
190
- - ext/commonmarker/iterator.c
191
- - ext/commonmarker/iterator.h
192
- - ext/commonmarker/latex.c
193
- - ext/commonmarker/linked_list.c
194
- - ext/commonmarker/man.c
195
- - ext/commonmarker/map.c
196
- - ext/commonmarker/map.h
197
- - ext/commonmarker/node.c
198
- - ext/commonmarker/node.h
199
- - ext/commonmarker/parser.h
200
- - ext/commonmarker/plaintext.c
201
- - ext/commonmarker/plugin.c
202
- - ext/commonmarker/plugin.h
203
- - ext/commonmarker/references.c
204
- - ext/commonmarker/references.h
205
- - ext/commonmarker/registry.c
206
- - ext/commonmarker/registry.h
207
- - ext/commonmarker/render.c
208
- - ext/commonmarker/render.h
209
- - ext/commonmarker/scanners.c
210
- - ext/commonmarker/scanners.h
211
- - ext/commonmarker/scanners.re
212
- - ext/commonmarker/strikethrough.c
213
- - ext/commonmarker/strikethrough.h
214
- - ext/commonmarker/syntax_extension.c
215
- - ext/commonmarker/syntax_extension.h
216
- - ext/commonmarker/table.c
217
- - ext/commonmarker/table.h
218
- - ext/commonmarker/tagfilter.c
219
- - ext/commonmarker/tagfilter.h
220
- - ext/commonmarker/tasklist.c
221
- - ext/commonmarker/tasklist.h
222
- - ext/commonmarker/utf8.c
223
- - ext/commonmarker/utf8.h
224
- - ext/commonmarker/xml.c
84
+ - ext/commonmarker/src/comrak_options.rs
85
+ - ext/commonmarker/src/lib.rs
225
86
  - lib/commonmarker.rb
226
87
  - lib/commonmarker/config.rb
227
- - lib/commonmarker/node.rb
228
- - lib/commonmarker/node/inspect.rb
88
+ - lib/commonmarker/extension.rb
229
89
  - lib/commonmarker/renderer.rb
230
- - lib/commonmarker/renderer/html_renderer.rb
231
90
  - lib/commonmarker/version.rb
232
91
  homepage: https://github.com/gjtorikian/commonmarker
233
92
  licenses:
234
93
  - MIT
235
94
  metadata:
95
+ allowed_push_host: https://rubygems.org
96
+ funding_uri: https://github.com/sponsors/gjtorikian/
97
+ source_code_uri: https://github.com/gjtorikian/commonmarker
236
98
  rubygems_mfa_required: 'true'
237
- post_install_message:
238
- rdoc_options:
239
- - "-x"
240
- - ext/commonmarker/cmark/.*
99
+ post_install_message:
100
+ rdoc_options: []
241
101
  require_paths:
242
102
  - lib
243
- - ext
244
103
  required_ruby_version: !ruby/object:Gem::Requirement
245
104
  requirements:
246
- - - ">="
247
- - !ruby/object:Gem::Version
248
- version: '2.6'
249
- - - "<"
105
+ - - "~>"
250
106
  - !ruby/object:Gem::Version
251
- version: '4.0'
107
+ version: '3.1'
252
108
  required_rubygems_version: !ruby/object:Gem::Requirement
253
109
  requirements:
254
110
  - - ">="
255
111
  - !ruby/object:Gem::Version
256
- version: '0'
112
+ version: 3.3.22
257
113
  requirements: []
258
- rubygems_version: 3.3.26
259
- signing_key:
114
+ rubygems_version: 3.3.22
115
+ signing_key:
260
116
  specification_version: 4
261
- summary: CommonMark parser and renderer. Written in C, wrapped in Ruby.
117
+ summary: CommonMark parser and renderer. Written in Rust, wrapped in Ruby.
262
118
  test_files: []