commonmarker 0.23.10 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Cargo.lock +1158 -0
- data/Cargo.toml +7 -0
- data/README.md +233 -172
- data/ext/commonmarker/Cargo.toml +20 -0
- data/ext/commonmarker/extconf.rb +3 -6
- data/ext/commonmarker/src/lib.rs +103 -0
- data/ext/commonmarker/src/node.rs +1167 -0
- data/ext/commonmarker/src/options.rs +216 -0
- data/ext/commonmarker/src/plugins/syntax_highlighting.rs +166 -0
- data/ext/commonmarker/src/plugins.rs +6 -0
- data/ext/commonmarker/src/utils.rs +8 -0
- data/lib/commonmarker/config.rb +91 -40
- data/lib/commonmarker/constants.rb +7 -0
- data/lib/commonmarker/extension.rb +14 -0
- data/lib/commonmarker/node/ast.rb +8 -0
- data/lib/commonmarker/node/inspect.rb +14 -4
- data/lib/commonmarker/node.rb +29 -47
- data/lib/commonmarker/renderer.rb +1 -127
- data/lib/commonmarker/utils.rb +22 -0
- data/lib/commonmarker/version.rb +2 -2
- data/lib/commonmarker.rb +27 -25
- metadata +43 -191
- data/Rakefile +0 -109
- data/bin/commonmarker +0 -118
- data/commonmarker.gemspec +0 -38
- data/ext/commonmarker/arena.c +0 -104
- data/ext/commonmarker/autolink.c +0 -508
- data/ext/commonmarker/autolink.h +0 -8
- data/ext/commonmarker/blocks.c +0 -1622
- data/ext/commonmarker/buffer.c +0 -278
- data/ext/commonmarker/buffer.h +0 -116
- data/ext/commonmarker/case_fold_switch.inc +0 -4327
- data/ext/commonmarker/chunk.h +0 -135
- data/ext/commonmarker/cmark-gfm-core-extensions.h +0 -54
- data/ext/commonmarker/cmark-gfm-extension_api.h +0 -737
- data/ext/commonmarker/cmark-gfm-extensions_export.h +0 -42
- data/ext/commonmarker/cmark-gfm.h +0 -833
- data/ext/commonmarker/cmark-gfm_export.h +0 -42
- data/ext/commonmarker/cmark-gfm_version.h +0 -7
- data/ext/commonmarker/cmark.c +0 -55
- data/ext/commonmarker/cmark_ctype.c +0 -44
- data/ext/commonmarker/cmark_ctype.h +0 -33
- data/ext/commonmarker/commonmark.c +0 -514
- data/ext/commonmarker/commonmarker.c +0 -1308
- data/ext/commonmarker/commonmarker.h +0 -16
- data/ext/commonmarker/config.h +0 -76
- data/ext/commonmarker/core-extensions.c +0 -27
- data/ext/commonmarker/entities.inc +0 -2138
- data/ext/commonmarker/ext_scanners.c +0 -879
- data/ext/commonmarker/ext_scanners.h +0 -24
- data/ext/commonmarker/footnotes.c +0 -63
- data/ext/commonmarker/footnotes.h +0 -27
- data/ext/commonmarker/houdini.h +0 -57
- data/ext/commonmarker/houdini_href_e.c +0 -100
- data/ext/commonmarker/houdini_html_e.c +0 -66
- data/ext/commonmarker/houdini_html_u.c +0 -149
- data/ext/commonmarker/html.c +0 -502
- data/ext/commonmarker/html.h +0 -27
- data/ext/commonmarker/inlines.c +0 -1788
- data/ext/commonmarker/inlines.h +0 -29
- data/ext/commonmarker/iterator.c +0 -159
- data/ext/commonmarker/iterator.h +0 -26
- data/ext/commonmarker/latex.c +0 -468
- data/ext/commonmarker/linked_list.c +0 -37
- data/ext/commonmarker/man.c +0 -274
- data/ext/commonmarker/map.c +0 -129
- data/ext/commonmarker/map.h +0 -44
- data/ext/commonmarker/node.c +0 -1045
- data/ext/commonmarker/node.h +0 -167
- data/ext/commonmarker/parser.h +0 -59
- data/ext/commonmarker/plaintext.c +0 -218
- data/ext/commonmarker/plugin.c +0 -36
- data/ext/commonmarker/plugin.h +0 -34
- data/ext/commonmarker/references.c +0 -43
- data/ext/commonmarker/references.h +0 -26
- data/ext/commonmarker/registry.c +0 -63
- data/ext/commonmarker/registry.h +0 -24
- data/ext/commonmarker/render.c +0 -213
- data/ext/commonmarker/render.h +0 -62
- data/ext/commonmarker/scanners.c +0 -14056
- data/ext/commonmarker/scanners.h +0 -70
- data/ext/commonmarker/scanners.re +0 -341
- data/ext/commonmarker/strikethrough.c +0 -167
- data/ext/commonmarker/strikethrough.h +0 -9
- data/ext/commonmarker/syntax_extension.c +0 -149
- data/ext/commonmarker/syntax_extension.h +0 -34
- data/ext/commonmarker/table.c +0 -917
- data/ext/commonmarker/table.h +0 -12
- data/ext/commonmarker/tagfilter.c +0 -60
- data/ext/commonmarker/tagfilter.h +0 -8
- data/ext/commonmarker/tasklist.c +0 -156
- data/ext/commonmarker/tasklist.h +0 -8
- data/ext/commonmarker/utf8.c +0 -317
- data/ext/commonmarker/utf8.h +0 -35
- data/ext/commonmarker/xml.c +0 -182
- data/lib/commonmarker/renderer/html_renderer.rb +0 -256
data/lib/commonmarker/node.rb
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "commonmarker/node/ast"
|
3
4
|
require "commonmarker/node/inspect"
|
4
5
|
|
5
|
-
module
|
6
|
+
module Commonmarker
|
6
7
|
class Node
|
7
8
|
include Enumerable
|
8
9
|
include Inspect
|
@@ -19,65 +20,46 @@ module CommonMarker
|
|
19
20
|
end
|
20
21
|
end
|
21
22
|
|
22
|
-
# Public:
|
23
|
-
|
24
|
-
|
25
|
-
# extensions - An {Array of Symbol}s indicating the extensions to use
|
26
|
-
#
|
27
|
-
# Returns a {String}.
|
28
|
-
def to_html(options = :DEFAULT, extensions = [])
|
29
|
-
opts = Config.process_options(options, :render)
|
30
|
-
_render_html(opts, extensions).force_encoding("utf-8")
|
31
|
-
end
|
23
|
+
# Public: Iterate over the children (if any) of the current pointer.
|
24
|
+
def each
|
25
|
+
return enum_for(:each) unless block_given?
|
32
26
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
opts = Config.process_options(options, :render)
|
40
|
-
_render_xml(opts).force_encoding("utf-8")
|
27
|
+
child = first_child
|
28
|
+
while child
|
29
|
+
next_child = child.next_sibling
|
30
|
+
yield child
|
31
|
+
child = next_child
|
32
|
+
end
|
41
33
|
end
|
42
34
|
|
43
|
-
# Public:
|
35
|
+
# Public: Converts a node to an HTML string.
|
44
36
|
#
|
45
|
-
# options - A {
|
46
|
-
#
|
37
|
+
# options - A {Hash} of render, parse, and extension options to transform the text.
|
38
|
+
# plugins - A {Hash} of additional plugins.
|
47
39
|
#
|
48
|
-
# Returns a {String}.
|
49
|
-
def
|
50
|
-
|
51
|
-
|
40
|
+
# Returns a {String} of HTML.
|
41
|
+
def to_html(options: Commonmarker::Config::OPTIONS, plugins: Commonmarker::Config::PLUGINS)
|
42
|
+
raise TypeError, "options must be a Hash; got a #{options.class}!" unless options.is_a?(Hash)
|
43
|
+
|
44
|
+
opts = Config.process_options(options)
|
45
|
+
plugins = Config.process_plugins(plugins)
|
46
|
+
|
47
|
+
node_to_html(options: opts, plugins: plugins).force_encoding("utf-8")
|
52
48
|
end
|
53
49
|
|
54
|
-
# Public: Convert the node to a
|
50
|
+
# Public: Convert the node to a CommonMark string.
|
55
51
|
#
|
56
52
|
# options - A {Symbol} or {Array of Symbol}s indicating the render options
|
57
|
-
#
|
53
|
+
# plugins - A {Hash} of additional plugins.
|
58
54
|
#
|
59
55
|
# Returns a {String}.
|
60
|
-
def
|
61
|
-
|
62
|
-
_render_plaintext(opts, width).force_encoding("utf-8")
|
63
|
-
end
|
64
|
-
|
65
|
-
# Public: Iterate over the children (if any) of the current pointer.
|
66
|
-
def each
|
67
|
-
return enum_for(:each) unless block_given?
|
56
|
+
def to_commonmark(options: Commonmarker::Config::OPTIONS, plugins: Commonmarker::Config::PLUGINS)
|
57
|
+
raise TypeError, "options must be a Hash; got a #{options.class}!" unless options.is_a?(Hash)
|
68
58
|
|
69
|
-
|
70
|
-
|
71
|
-
nextchild = child.next
|
72
|
-
yield child
|
73
|
-
child = nextchild
|
74
|
-
end
|
75
|
-
end
|
59
|
+
opts = Config.process_options(options)
|
60
|
+
plugins = Config.process_plugins(plugins)
|
76
61
|
|
77
|
-
|
78
|
-
def each_child(&block)
|
79
|
-
warn("[DEPRECATION] `each_child` is deprecated. Please use `each` instead.")
|
80
|
-
each(&block)
|
62
|
+
node_to_commonmark(options: opts, plugins: plugins).force_encoding("utf-8")
|
81
63
|
end
|
82
64
|
end
|
83
65
|
end
|
@@ -3,133 +3,7 @@
|
|
3
3
|
require "set"
|
4
4
|
require "stringio"
|
5
5
|
|
6
|
-
module
|
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
|
-
'<\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
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "commonmarker/constants"
|
4
|
+
|
5
|
+
module Commonmarker
|
6
|
+
module Utils
|
7
|
+
include Commonmarker::Constants
|
8
|
+
|
9
|
+
def fetch_kv(options, key, value, type)
|
10
|
+
value_klass = value.class
|
11
|
+
|
12
|
+
if Constants::BOOLS.include?(value) && BOOLS.include?(options[key])
|
13
|
+
options[key]
|
14
|
+
elsif options[key].is_a?(value_klass)
|
15
|
+
options[key]
|
16
|
+
else
|
17
|
+
expected_type = Constants::BOOLS.include?(value) ? "Boolean" : value_klass.to_s
|
18
|
+
raise TypeError, "#{type} option `:#{key}` must be #{expected_type}; got #{options[key].class}"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/commonmarker/version.rb
CHANGED
data/lib/commonmarker.rb
CHANGED
@@ -1,45 +1,47 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
1
|
# frozen_string_literal: true
|
3
2
|
|
4
|
-
|
5
|
-
|
3
|
+
require_relative "commonmarker/extension"
|
4
|
+
|
5
|
+
require "commonmarker/utils"
|
6
6
|
require "commonmarker/node"
|
7
|
+
require "commonmarker/config"
|
7
8
|
require "commonmarker/renderer"
|
8
|
-
require "commonmarker/renderer/html_renderer"
|
9
9
|
require "commonmarker/version"
|
10
10
|
|
11
|
-
|
12
|
-
require "awesome_print"
|
13
|
-
rescue LoadError; end # rubocop:disable Lint/SuppressedException
|
14
|
-
module CommonMarker
|
11
|
+
module Commonmarker
|
15
12
|
class << self
|
16
|
-
# Public:
|
13
|
+
# Public: Parses a CommonMark string into an HTML string.
|
17
14
|
#
|
18
15
|
# text - A {String} of text
|
19
|
-
#
|
20
|
-
# extensions - An {Array of Symbol}s indicating the extensions to use
|
16
|
+
# options - A {Hash} of render, parse, and extension options to transform the text.
|
21
17
|
#
|
22
|
-
# Returns
|
23
|
-
def
|
18
|
+
# Returns the `parser` node.
|
19
|
+
def parse(text, options: Commonmarker::Config::OPTIONS)
|
24
20
|
raise TypeError, "text must be a String; got a #{text.class}!" unless text.is_a?(String)
|
21
|
+
raise TypeError, "text must be UTF-8 encoded; got #{text.encoding}!" unless text.encoding.name == "UTF-8"
|
22
|
+
raise TypeError, "options must be a Hash; got a #{options.class}!" unless options.is_a?(Hash)
|
23
|
+
|
24
|
+
opts = Config.process_options(options)
|
25
25
|
|
26
|
-
|
27
|
-
Node.markdown_to_html(text.encode("UTF-8"), opts, extensions)
|
26
|
+
commonmark_parse(text, options: opts)
|
28
27
|
end
|
29
28
|
|
30
|
-
# Public: Parses a
|
29
|
+
# Public: Parses a CommonMark string into an HTML string.
|
31
30
|
#
|
32
|
-
#
|
33
|
-
#
|
34
|
-
#
|
31
|
+
# text - A {String} of text
|
32
|
+
# options - A {Hash} of render, parse, and extension options to transform the text.
|
33
|
+
# plugins - A {Hash} of additional plugins.
|
35
34
|
#
|
36
|
-
# Returns
|
37
|
-
def
|
35
|
+
# Returns a {String} of converted HTML.
|
36
|
+
def to_html(text, options: Commonmarker::Config::OPTIONS, plugins: Commonmarker::Config::PLUGINS)
|
38
37
|
raise TypeError, "text must be a String; got a #{text.class}!" unless text.is_a?(String)
|
38
|
+
raise TypeError, "text must be UTF-8 encoded; got #{text.encoding}!" unless text.encoding.name == "UTF-8"
|
39
|
+
raise TypeError, "options must be a Hash; got a #{options.class}!" unless options.is_a?(Hash)
|
39
40
|
|
40
|
-
opts = Config.process_options(options
|
41
|
-
|
42
|
-
|
41
|
+
opts = Config.process_options(options)
|
42
|
+
plugins = Config.process_plugins(plugins)
|
43
|
+
|
44
|
+
commonmark_to_html(text, options: opts, plugins: plugins)
|
43
45
|
end
|
44
|
-
end
|
46
|
+
end
|
45
47
|
end
|
metadata
CHANGED
@@ -1,262 +1,114 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: commonmarker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen Torikian
|
8
8
|
- Ashe Connor
|
9
|
-
autorequire:
|
10
|
-
bindir:
|
9
|
+
autorequire:
|
10
|
+
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-12-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
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
|
15
|
+
name: rb_sys
|
30
16
|
requirement: !ruby/object:Gem::Requirement
|
31
17
|
requirements:
|
32
18
|
- - "~>"
|
33
19
|
- !ruby/object:Gem::Version
|
34
|
-
version: '
|
35
|
-
type: :
|
36
|
-
prerelease: false
|
37
|
-
version_requirements: !ruby/object:Gem::Requirement
|
38
|
-
requirements:
|
39
|
-
- - "~>"
|
40
|
-
- !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
|
50
|
-
prerelease: false
|
51
|
-
version_requirements: !ruby/object:Gem::Requirement
|
52
|
-
requirements:
|
53
|
-
- - "~>"
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
version: '5.6'
|
56
|
-
- !ruby/object:Gem::Dependency
|
57
|
-
name: minitest-focus
|
58
|
-
requirement: !ruby/object:Gem::Requirement
|
59
|
-
requirements:
|
60
|
-
- - "~>"
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version: '1.1'
|
63
|
-
type: :development
|
20
|
+
version: '0.9'
|
21
|
+
type: :runtime
|
64
22
|
prerelease: false
|
65
23
|
version_requirements: !ruby/object:Gem::Requirement
|
66
24
|
requirements:
|
67
25
|
- - "~>"
|
68
26
|
- !ruby/object:Gem::Version
|
69
|
-
version: '
|
27
|
+
version: '0.9'
|
28
|
+
force_ruby_platform: false
|
70
29
|
- !ruby/object:Gem::Dependency
|
71
30
|
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'
|
84
|
-
- !ruby/object:Gem::Dependency
|
85
|
-
name: rake-compiler
|
86
31
|
requirement: !ruby/object:Gem::Requirement
|
87
32
|
requirements:
|
88
33
|
- - "~>"
|
89
34
|
- !ruby/object:Gem::Version
|
90
|
-
version: '0
|
35
|
+
version: '13.0'
|
91
36
|
type: :development
|
92
37
|
prerelease: false
|
93
38
|
version_requirements: !ruby/object:Gem::Requirement
|
94
39
|
requirements:
|
95
40
|
- - "~>"
|
96
41
|
- !ruby/object:Gem::Version
|
97
|
-
version: '0
|
42
|
+
version: '13.0'
|
98
43
|
- !ruby/object:Gem::Dependency
|
99
|
-
name:
|
44
|
+
name: rake-compiler
|
100
45
|
requirement: !ruby/object:Gem::Requirement
|
101
46
|
requirements:
|
102
47
|
- - "~>"
|
103
48
|
- !ruby/object:Gem::Version
|
104
|
-
version: '
|
49
|
+
version: '1.2'
|
105
50
|
type: :development
|
106
51
|
prerelease: false
|
107
52
|
version_requirements: !ruby/object:Gem::Requirement
|
108
53
|
requirements:
|
109
54
|
- - "~>"
|
110
55
|
- !ruby/object:Gem::Version
|
111
|
-
version: '
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
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
|
56
|
+
version: '1.2'
|
57
|
+
description: A fast, safe, extensible parser for CommonMark. This wraps the comrak
|
58
|
+
Rust crate.
|
59
|
+
email:
|
60
|
+
executables: []
|
145
61
|
extensions:
|
146
62
|
- ext/commonmarker/extconf.rb
|
147
63
|
extra_rdoc_files: []
|
148
64
|
files:
|
65
|
+
- Cargo.lock
|
66
|
+
- Cargo.toml
|
149
67
|
- LICENSE.txt
|
150
68
|
- README.md
|
151
|
-
-
|
152
|
-
- bin/commonmarker
|
153
|
-
- 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
|
69
|
+
- ext/commonmarker/Cargo.toml
|
179
70
|
- ext/commonmarker/extconf.rb
|
180
|
-
- ext/commonmarker/
|
181
|
-
- ext/commonmarker/
|
182
|
-
- ext/commonmarker/
|
183
|
-
- ext/commonmarker/
|
184
|
-
- ext/commonmarker/
|
185
|
-
- ext/commonmarker/
|
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
|
71
|
+
- ext/commonmarker/src/lib.rs
|
72
|
+
- ext/commonmarker/src/node.rs
|
73
|
+
- ext/commonmarker/src/options.rs
|
74
|
+
- ext/commonmarker/src/plugins.rs
|
75
|
+
- ext/commonmarker/src/plugins/syntax_highlighting.rs
|
76
|
+
- ext/commonmarker/src/utils.rs
|
225
77
|
- lib/commonmarker.rb
|
226
78
|
- lib/commonmarker/config.rb
|
79
|
+
- lib/commonmarker/constants.rb
|
80
|
+
- lib/commonmarker/extension.rb
|
227
81
|
- lib/commonmarker/node.rb
|
82
|
+
- lib/commonmarker/node/ast.rb
|
228
83
|
- lib/commonmarker/node/inspect.rb
|
229
84
|
- lib/commonmarker/renderer.rb
|
230
|
-
- lib/commonmarker/
|
85
|
+
- lib/commonmarker/utils.rb
|
231
86
|
- lib/commonmarker/version.rb
|
232
87
|
homepage: https://github.com/gjtorikian/commonmarker
|
233
88
|
licenses:
|
234
89
|
- MIT
|
235
90
|
metadata:
|
91
|
+
allowed_push_host: https://rubygems.org
|
92
|
+
funding_uri: https://github.com/sponsors/gjtorikian/
|
93
|
+
source_code_uri: https://github.com/gjtorikian/commonmarker
|
236
94
|
rubygems_mfa_required: 'true'
|
237
|
-
post_install_message:
|
238
|
-
rdoc_options:
|
239
|
-
- "-x"
|
240
|
-
- ext/commonmarker/cmark/.*
|
95
|
+
post_install_message:
|
96
|
+
rdoc_options: []
|
241
97
|
require_paths:
|
242
98
|
- lib
|
243
|
-
- ext
|
244
99
|
required_ruby_version: !ruby/object:Gem::Requirement
|
245
100
|
requirements:
|
246
|
-
- - "
|
247
|
-
- !ruby/object:Gem::Version
|
248
|
-
version: '2.6'
|
249
|
-
- - "<"
|
101
|
+
- - "~>"
|
250
102
|
- !ruby/object:Gem::Version
|
251
|
-
version: '
|
103
|
+
version: '3.1'
|
252
104
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
253
105
|
requirements:
|
254
|
-
- - "
|
106
|
+
- - "~>"
|
255
107
|
- !ruby/object:Gem::Version
|
256
|
-
version: '
|
108
|
+
version: '3.4'
|
257
109
|
requirements: []
|
258
|
-
rubygems_version: 3.3
|
259
|
-
signing_key:
|
110
|
+
rubygems_version: 3.5.3
|
111
|
+
signing_key:
|
260
112
|
specification_version: 4
|
261
|
-
summary: CommonMark parser and renderer. Written in
|
113
|
+
summary: CommonMark parser and renderer. Written in Rust, wrapped in Ruby.
|
262
114
|
test_files: []
|