commonmarker 2.4.1-x86_64-darwin → 2.6.0-x86_64-darwin

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '08f7ffac09361b1bc38e35b717a30435aadbb32c922e9df251c543326016bde7'
4
- data.tar.gz: 69ba2885a5d0db1f9d6b9d244e06d28427a41ba75453010d323481d006a9d944
3
+ metadata.gz: 89d3837335ef8544d62f5f071effcf76e58ea1f5025c75259f8c4d59f0b0b454
4
+ data.tar.gz: 0f8e9ab80dfa4bc6636263c666526dc0164dc73c0aea1d928e81522b222f8762
5
5
  SHA512:
6
- metadata.gz: 1052022c125f595449a884d02ae97410d489637312f1d7397826659e58bc80d26b84755c052c33b02f4a1a6f56d9283f0e6114db5be2abba6edf0e2c693bcdcd
7
- data.tar.gz: bd92af3888a2b448135f815cc51bc537755e0de04cbaa62ed4ff6898f631f14e5950edd02a0e2cc5f78bbe6217e06d7e5e134fd9d21a3ad9708ee248f24c194c
6
+ metadata.gz: a9d94e361dc703489392d0440330379bb8ceecbb3c93e6fd24532b863b7745fb2f773f503f7c855888bf5e4db782cf14b9faa9adb5d052454190a874d0c69e4d
7
+ data.tar.gz: 571a6bc3a59d2c84217a8e5841de218fd3e93c9ba0eb149609157c2a9d03508462862a8d5118fddafc7d3fc99a88ebc2b931fac6bd55f63fff9ed3ff2c49f31b
data/README.md CHANGED
@@ -156,12 +156,13 @@ Note that there is a distinction in comrak for "parse" options and "render" opti
156
156
 
157
157
  ### Parse options
158
158
 
159
- | Name | Description | Default |
160
- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
161
- | `smart` | Punctuation (quotes, full-stops and hyphens) are converted into 'smart' punctuation. | `false` |
162
- | `default_info_string` | The default info string for fenced code blocks. | `""` |
163
- | `relaxed_tasklist_matching` | Enables relaxing of the tasklist extension matching, allowing any non-space to be used for the "checked" state instead of only `x` and `X`. | `false` |
164
- | `relaxed_autolinks` | Enable relaxing of the autolink extension parsing, allowing links to be recognized when in brackets, as well as permitting any url scheme. | `false` |
159
+ | Name | Description | Default |
160
+ | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
161
+ | `smart` | Punctuation (quotes, full-stops and hyphens) are converted into 'smart' punctuation. | `false` |
162
+ | `default_info_string` | The default info string for fenced code blocks. | `""` |
163
+ | `relaxed_tasklist_matching` | Enables relaxing of the tasklist extension matching, allowing any non-space to be used for the "checked" state instead of only `x` and `X`. | `false` |
164
+ | `relaxed_autolinks` | Enable relaxing of the autolink extension parsing, allowing links to be recognized when in brackets, as well as permitting any url scheme. | `false` |
165
+ | `leave_footnote_definitions` | Allow footnote definitions to remain in their original positions instead of being moved to the document's end (only affects AST) | `false` |
165
166
 
166
167
  ### Render options
167
168
 
@@ -202,6 +203,7 @@ Commonmarker.to_html('"Hi *there*"', options: {
202
203
  | `superscript` | Enables the superscript Comrak extension. | `false` |
203
204
  | `header_ids` | Enables the header IDs Comrak extension. from the GFM spec. | `""` |
204
205
  | `footnotes` | Enables the footnotes extension per `cmark-gfm`. | `false` |
206
+ | `inline_footnotes` | Enables the inline footnotes extension. | `false` |
205
207
  | `description_lists` | Enables the description lists extension. | `false` |
206
208
  | `front_matter_delimiter` | Enables the front matter extension. | `""` |
207
209
  | `multiline_block_quotes` | Enables the multiline block quotes extension. | `false` |
@@ -212,9 +214,11 @@ Commonmarker.to_html('"Hi *there*"', options: {
212
214
  | `underline` | Enables the underline extension. | `false` |
213
215
  | `spoiler` | Enables the spoiler extension. | `false` |
214
216
  | `greentext` | Enables the greentext extension. | `false` |
217
+ | `subtext` | Enables the subtext extension. | `false` |
215
218
  | `subscript` | Enables the subscript extension. | `false` |
216
219
  | `alerts` | Enables the alerts extension. | `false` |
217
220
  | `cjk_friendly_emphasis` | Enables the [CJK friendly emphasis](https://github.com/tats-u/markdown-cjk-friendly) extension. | `false` |
221
+ | `highlight` | Enables highlighting via `==` | `false` |
218
222
 
219
223
  For more information on these options, see [the comrak documentation](https://github.com/kivikakk/comrak#usage).
220
224
 
@@ -10,6 +10,7 @@ module Commonmarker
10
10
  default_info_string: "",
11
11
  relaxed_tasklist_matching: false,
12
12
  relaxed_autolinks: false,
13
+ leave_footnote_definitions: false,
13
14
  }.freeze,
14
15
  render: {
15
16
  hardbreaks: true,
@@ -35,6 +36,7 @@ module Commonmarker
35
36
  superscript: false,
36
37
  header_ids: "",
37
38
  footnotes: false,
39
+ inline_footnotes: false,
38
40
  description_lists: false,
39
41
  front_matter_delimiter: "",
40
42
  multiline_block_quotes: false,
@@ -47,8 +49,10 @@ module Commonmarker
47
49
  spoiler: false,
48
50
  greentext: false,
49
51
  subscript: false,
52
+ subtext: false,
50
53
  alerts: false,
51
54
  cjk_friendly_emphasis: false,
55
+ highlight: false,
52
56
  }.freeze,
53
57
  format: [:html].freeze,
54
58
  }.freeze
@@ -44,7 +44,7 @@ module Commonmarker
44
44
  opts = Config.process_options(options)
45
45
  plugins = Config.process_plugins(plugins)
46
46
 
47
- node_to_html(options: opts, plugins: plugins).force_encoding("utf-8")
47
+ node_to_html(render: opts[:render], parse: opts[:parse], extension: opts[:extension], plugins: plugins).force_encoding("utf-8")
48
48
  end
49
49
 
50
50
  # Public: Convert the node to a CommonMark string.
@@ -59,7 +59,7 @@ module Commonmarker
59
59
  opts = Config.process_options(options)
60
60
  plugins = Config.process_plugins(plugins)
61
61
 
62
- node_to_commonmark(options: opts, plugins: plugins).force_encoding("utf-8")
62
+ node_to_commonmark(render: opts[:render], parse: opts[:parse], extension: opts[:extension], plugins: plugins).force_encoding("utf-8")
63
63
  end
64
64
  end
65
65
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Commonmarker
4
- VERSION = "2.4.1"
4
+ VERSION = "2.6.0"
5
5
  end
data/lib/commonmarker.rb CHANGED
@@ -23,7 +23,7 @@ module Commonmarker
23
23
 
24
24
  opts = Config.process_options(options)
25
25
 
26
- commonmark_parse(text, options: opts)
26
+ commonmark_parse(text, parse: opts.fetch(:parse, {}), render: opts.fetch(:render, {}), extension: opts.fetch(:extension, {}))
27
27
  end
28
28
 
29
29
  # Public: Parses a CommonMark string into an HTML string.
@@ -41,7 +41,7 @@ module Commonmarker
41
41
  opts = Config.process_options(options)
42
42
  plugins = Config.process_plugins(plugins)
43
43
 
44
- commonmark_to_html(text, options: opts, plugins: plugins)
44
+ commonmark_to_html(text, parse: opts.fetch(:parse, {}), render: opts.fetch(:render, {}), extension: opts.fetch(:extension, {}), plugins: plugins)
45
45
  end
46
46
  end
47
47
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: commonmarker
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.1
4
+ version: 2.6.0
5
5
  platform: x86_64-darwin
6
6
  authors:
7
7
  - Garen Torikian
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2025-09-29 00:00:00.000000000 Z
12
+ date: 2025-12-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -83,7 +83,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
83
83
  version: 3.5.dev
84
84
  required_rubygems_version: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - "~>"
86
+ - - ">="
87
87
  - !ruby/object:Gem::Version
88
88
  version: '3.4'
89
89
  requirements: []