commonmarker 1.0.0.pre-x86_64-linux → 1.0.0.pre7-x86_64-linux

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: commonmarker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre
4
+ version: 1.0.0.pre7
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - Garen Torikian
8
8
  - Ashe Connor
9
- autorequire:
9
+ autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2022-11-03 00:00:00.000000000 Z
12
+ date: 2023-01-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rb_sys
@@ -25,6 +25,7 @@ dependencies:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
27
  version: '0.9'
28
+ force_ruby_platform: false
28
29
  - !ruby/object:Gem::Dependency
29
30
  name: rake
30
31
  requirement: !ruby/object:Gem::Requirement
@@ -69,24 +70,30 @@ dependencies:
69
70
  version: '1.2'
70
71
  description: A fast, safe, extensible parser for CommonMark. This wraps the comrak
71
72
  Rust crate.
72
- email:
73
+ email:
73
74
  executables: []
74
75
  extensions: []
75
76
  extra_rdoc_files: []
76
77
  files:
78
+ - Cargo.lock
77
79
  - LICENSE.txt
78
80
  - README.md
79
- - commonmarker.gemspec
80
81
  - ext/commonmarker/Cargo.toml
81
82
  - ext/commonmarker/_util.rb
82
83
  - ext/commonmarker/extconf.rb
83
- - ext/commonmarker/src/comrak_options.rs
84
84
  - ext/commonmarker/src/lib.rs
85
+ - ext/commonmarker/src/options.rs
86
+ - ext/commonmarker/src/plugins.rs
87
+ - ext/commonmarker/src/plugins/syntax_highlighting.rs
88
+ - ext/commonmarker/src/utils.rs
85
89
  - lib/commonmarker.rb
86
90
  - lib/commonmarker/3.1/commonmarker.so
91
+ - lib/commonmarker/3.2/commonmarker.so
87
92
  - lib/commonmarker/config.rb
93
+ - lib/commonmarker/constants.rb
88
94
  - lib/commonmarker/extension.rb
89
95
  - lib/commonmarker/renderer.rb
96
+ - lib/commonmarker/utils.rb
90
97
  - lib/commonmarker/version.rb
91
98
  homepage: https://github.com/gjtorikian/commonmarker
92
99
  licenses:
@@ -96,7 +103,7 @@ metadata:
96
103
  funding_uri: https://github.com/sponsors/gjtorikian/
97
104
  source_code_uri: https://github.com/gjtorikian/commonmarker
98
105
  rubygems_mfa_required: 'true'
99
- post_install_message:
106
+ post_install_message:
100
107
  rdoc_options: []
101
108
  require_paths:
102
109
  - lib
@@ -107,15 +114,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
107
114
  version: '3.1'
108
115
  - - "<"
109
116
  - !ruby/object:Gem::Version
110
- version: 3.2.dev
117
+ version: 3.3.dev
111
118
  required_rubygems_version: !ruby/object:Gem::Requirement
112
119
  requirements:
113
120
  - - ">="
114
121
  - !ruby/object:Gem::Version
115
122
  version: 3.3.22
116
123
  requirements: []
117
- rubygems_version: 3.3.22
118
- signing_key:
124
+ rubygems_version: 3.4.4
125
+ signing_key:
119
126
  specification_version: 4
120
127
  summary: CommonMark parser and renderer. Written in Rust, wrapped in Ruby.
121
128
  test_files: []
data/commonmarker.gemspec DELETED
@@ -1,41 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- lib = File.expand_path("lib", __dir__)
4
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
- require "commonmarker/version"
6
-
7
- Gem::Specification.new do |spec|
8
- spec.name = "commonmarker"
9
- spec.version = Commonmarker::VERSION
10
- spec.summary = "CommonMark parser and renderer. Written in Rust, wrapped in Ruby."
11
- spec.description = "A fast, safe, extensible parser for CommonMark. This wraps the comrak Rust crate."
12
- spec.authors = ["Garen Torikian", "Ashe Connor"]
13
- spec.license = "MIT"
14
- spec.homepage = "https://github.com/gjtorikian/commonmarker"
15
-
16
- spec.required_ruby_version = "~> 3.1"
17
- # https://github.com/rubygems/rubygems/pull/5852#issuecomment-1231118509
18
- spec.required_rubygems_version = ">= 3.3.22"
19
-
20
- spec.files = ["LICENSE.txt", "README.md", "commonmarker.gemspec"]
21
- spec.files += Dir.glob("lib/**/*.rb")
22
- spec.files += Dir.glob("ext/**/*.{rs,toml,lock,rb}")
23
- spec.bindir = "exe"
24
- spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
25
-
26
- spec.require_paths = ["lib"]
27
- spec.extensions = ["ext/commonmarker/Cargo.toml"]
28
-
29
- spec.metadata = {
30
- "allowed_push_host" => "https://rubygems.org",
31
- "funding_uri" => "https://github.com/sponsors/gjtorikian/",
32
- "source_code_uri" => "https://github.com/gjtorikian/commonmarker",
33
- "rubygems_mfa_required" => "true",
34
- }
35
-
36
- spec.add_dependency("rb_sys", "~> 0.9")
37
-
38
- spec.add_development_dependency("rake", "~> 13.0")
39
- spec.add_development_dependency("rake-compiler", "~> 1.2")
40
- spec.add_development_dependency("rake-compiler-dock", "~> 1.2")
41
- end
@@ -1,107 +0,0 @@
1
- use comrak::ComrakOptions;
2
-
3
- use magnus::{class, r_hash::ForEach, Error, RHash, Symbol, Value};
4
-
5
- fn iterate_parse_options(comrak_options: &mut ComrakOptions, options_hash: RHash) {
6
- options_hash.foreach(|key: Symbol, value: Value| {
7
- if key.name().unwrap() == "smart" {
8
- comrak_options.parse.smart = value.try_convert::<bool>()?;
9
- }
10
- if key.name().unwrap() == "default_info_string" {
11
- comrak_options.parse.default_info_string = Some(value.try_convert::<String>().unwrap());
12
- }
13
- Ok(ForEach::Continue)
14
- });
15
- }
16
-
17
- fn iterate_render_options(comrak_options: &mut ComrakOptions, options_hash: RHash) {
18
- options_hash.foreach(|key: Symbol, value: Value| {
19
- if key.name().unwrap() == "hardbreaks" {
20
- comrak_options.render.hardbreaks = value.try_convert::<bool>()?;
21
- }
22
-
23
- if key.name().unwrap() == "github_pre_lang" {
24
- comrak_options.render.github_pre_lang = value.try_convert::<bool>()?;
25
- }
26
-
27
- if key.name().unwrap() == "width" {
28
- comrak_options.render.width = value.try_convert::<usize>()?;
29
- }
30
-
31
- if key.name().unwrap() == "unsafe_" {
32
- comrak_options.render.unsafe_ = value.try_convert::<bool>()?;
33
- }
34
-
35
- if key.name().unwrap() == "escape" {
36
- comrak_options.render.escape = value.try_convert::<bool>()?;
37
- }
38
-
39
- Ok(ForEach::Continue)
40
- });
41
- }
42
-
43
- fn iterate_extension_options(comrak_options: &mut ComrakOptions, options_hash: RHash) {
44
- options_hash.foreach(|key: Symbol, value: Value| {
45
- if key.name().unwrap() == "strikethrough" {
46
- comrak_options.extension.strikethrough = value.try_convert::<bool>()?;
47
- }
48
-
49
- if key.name().unwrap() == "tagfilter" {
50
- comrak_options.extension.tagfilter = value.try_convert::<bool>()?;
51
- }
52
-
53
- if key.name().unwrap() == "table" {
54
- comrak_options.extension.table = value.try_convert::<bool>()?;
55
- }
56
-
57
- if key.name().unwrap() == "autolink" {
58
- comrak_options.extension.autolink = value.try_convert::<bool>()?;
59
- }
60
-
61
- if key.name().unwrap() == "tasklist" {
62
- comrak_options.extension.tasklist = value.try_convert::<bool>()?;
63
- }
64
-
65
- if key.name().unwrap() == "superscript" {
66
- comrak_options.extension.superscript = value.try_convert::<bool>()?;
67
- }
68
-
69
- if key.name().unwrap() == "header_ids" {
70
- comrak_options.extension.header_ids = Some(value.try_convert::<String>().unwrap());
71
- }
72
-
73
- if key.name().unwrap() == "footnotes" {
74
- comrak_options.extension.footnotes = value.try_convert::<bool>()?;
75
- }
76
-
77
- if key.name().unwrap() == "description_lists" {
78
- comrak_options.extension.description_lists = value.try_convert::<bool>()?;
79
- }
80
-
81
- if key.name().unwrap() == "front_matter_delimiter" {
82
- comrak_options.extension.front_matter_delimiter =
83
- Some(value.try_convert::<String>().unwrap());
84
- }
85
-
86
- Ok(ForEach::Continue)
87
- });
88
- }
89
-
90
- pub fn iterate_options_hash(
91
- comrak_options: &mut ComrakOptions,
92
- key: Symbol,
93
- value: RHash,
94
- ) -> Result<ForEach, Error> {
95
- assert!(value.is_kind_of(class::hash()));
96
-
97
- if key.name().unwrap() == "parse" {
98
- iterate_parse_options(comrak_options, value);
99
- }
100
- if key.name().unwrap() == "render" {
101
- iterate_render_options(comrak_options, value);
102
- }
103
- if key.name().unwrap() == "extension" {
104
- iterate_extension_options(comrak_options, value);
105
- }
106
- Ok(ForEach::Continue)
107
- }