commonmarker 2.10.0-arm-linux-gnu → 2.10.1-arm-linux-gnu

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: 35327c693dd53702f646b2cce40ee187a4c901340bc370f8e54285acc5a78526
4
- data.tar.gz: f6913b5d0ff1907b1431dc1333b2a4af393d1ba9dcfe1b2fb13de0307e12570d
3
+ metadata.gz: a88b287030a491136f5abfd68661a59e74477fbb2e5eb22e3dd833414267d37e
4
+ data.tar.gz: a3dfa4ed1d5d54743948ee685857d3647d2c8682934bc4205132e95b8f54a128
5
5
  SHA512:
6
- metadata.gz: 4e14faf517356b5d4ad8d81d7d50676a34da3b0a21be3fef6ef9f5d2cd9afedeeafa9ecb8b35c8bf276eb006fdf4ec5380ec2f6707fb9b9eeef31bc56673eb87
7
- data.tar.gz: 1d16283507055f8036c093e5db3408854f5b074ee8e15d79b4f0f17ade0e8874294f133a50aaefb1f514f3d9eb731e41bc9e66dcbeeeebd523961d1803be1df5
6
+ metadata.gz: 6a5786034384967b46591c18ae195b3a03a09a84597181f2190943973ee30eba10b01eb9fa826297b0a053f9dcc05caa759af3c8ad2f86d775a8ee0b47802803
7
+ data.tar.gz: e106f121ab48ad30a7ff4b74ebe3d56b6e4df7ca1fd43e47d10623745c03210b9d898086b29cd08eb19958aaf5e862a967d8a7a36db25ea0b2c13304ac3ece32
data/README.md CHANGED
@@ -5,7 +5,7 @@ Ruby wrapper for Rust's [comrak](https://github.com/kivikakk/comrak) crate.
5
5
  It passes all of the CommonMark test suite, and is therefore spec-complete. It also includes extensions to the CommonMark spec as documented in the [GitHub Flavored Markdown spec](http://github.github.com/gfm/), such as support for tables, strikethroughs, and autolinking.
6
6
 
7
7
  > [!NOTE]
8
- > By default, the following extensions are enabled for end user convenience: `strikethrough`, `tagfilter`, `table`, `autolink`, `tasklist` (all from the [GFM spec](http://github.github.com/gfm/)), and `shortcodes`. The `syntax_highlighter` plugin is also enabled by default, using the `"base16-ocean.dark"` theme.
8
+ > By default, the following extensions are enabled for end user convenience: `strikethrough`, `table`, `autolink`, `tasklist` (all from the [GFM spec](http://github.github.com/gfm/)), and `shortcodes`. The `syntax_highlighter` plugin is also enabled by default, using the `"base16-ocean.dark"` theme.
9
9
  >
10
10
  > For more information on the available options and extensions, see [the documentation below](#options-and-plugins).
11
11
 
@@ -184,6 +184,7 @@ Note that there is a distinction in comrak for "parse" options and "render" opti
184
184
  | `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` |
185
185
  | `ignore_setext` | Ignores setext-style headings. | `false` |
186
186
  | `sourcepos_chars` | Use character-based column tracking in source positions instead of byte-based. Relevant for multi-byte UTF-8 documents with `sourcepos`. | `false` |
187
+ | `max_nesting_depth` | The deepest a node may nest below the document. Deeper documents raise `Commonmarker::NestingDepthExceededError` instead of being parsed. | `1000` |
187
188
 
188
189
  ### Render options
189
190
 
@@ -218,7 +219,6 @@ Commonmarker.to_html('"Hi *there*"', options: {
218
219
  | Name | Description | Default |
219
220
  | ----------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------- |
220
221
  | `strikethrough` | Enables the [strikethrough extension](https://github.github.com/gfm/#strikethrough-extension-) from the GFM spec. | `true` |
221
- | `tagfilter` | Enables the [tagfilter extension](https://github.github.com/gfm/#disallowed-raw-html-extension-) from the GFM spec. | `true` |
222
222
  | `table` | Enables the [table extension](https://github.github.com/gfm/#tables-extension-) from the GFM spec. | `true` |
223
223
  | `autolink` | Enables the [autolink extension](https://github.github.com/gfm/#autolinks-extension-) from the GFM spec. | `true` |
224
224
  | `tasklist` | Enables the [task list extension](https://github.github.com/gfm/#task-list-items-extension-) from the GFM spec. | `true` |
Binary file
Binary file
Binary file
Binary file
@@ -13,6 +13,7 @@ module Commonmarker
13
13
  leave_footnote_definitions: false,
14
14
  ignore_setext: false,
15
15
  sourcepos_chars: false,
16
+ max_nesting_depth: 1000,
16
17
  }.freeze,
17
18
  render: {
18
19
  hardbreaks: true,
@@ -32,7 +33,6 @@ module Commonmarker
32
33
  }.freeze,
33
34
  extension: {
34
35
  strikethrough: true,
35
- tagfilter: true,
36
36
  table: true,
37
37
  autolink: true,
38
38
  tasklist: true,
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Commonmarker
4
+ # Raised when a document nests more deeply than the `max_nesting_depth`
5
+ # parse option allows.
6
+ class NestingDepthExceededError < StandardError; end
7
+ end
@@ -20,15 +20,28 @@ module Commonmarker
20
20
  super
21
21
  end
22
22
 
23
- # Public: An iterator that "walks the tree," descending into children recursively.
23
+ # Public: An iterator that "walks the tree," yielding each node and then
24
+ # its descendants, in document order.
24
25
  #
25
- # blk - A {Proc} representing the action to take for each child
26
+ # The walk is iterative rather than recursive, so arbitrarily deep trees
27
+ # can't exhaust the stack.
28
+ #
29
+ # blk - A {Proc} representing the action to take for each node
26
30
  def walk(&block)
27
31
  return enum_for(:walk) unless block
28
32
 
29
33
  yield self
30
- each do |child|
31
- child.walk(&block)
34
+
35
+ # Like #each, the next sibling is captured before a node is yielded, so
36
+ # the block may detach or replace the node it is given. `pending` holds
37
+ # the sibling to resume at once each ancestor's subtree is done.
38
+ pending = []
39
+ node = first_child
40
+ while node
41
+ next_node = node.next_sibling
42
+ yield node
43
+ pending << next_node if next_node
44
+ node = node.first_child || pending.pop
32
45
  end
33
46
  end
34
47
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Commonmarker
4
- VERSION = "2.10.0"
4
+ VERSION = "2.10.1"
5
5
  end
data/lib/commonmarker.rb CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  require_relative "commonmarker/extension"
4
4
 
5
+ require "commonmarker/errors"
5
6
  require "commonmarker/utils"
6
7
  require "commonmarker/node"
7
8
  require "commonmarker/config"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: commonmarker
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.10.0
4
+ version: 2.10.1
5
5
  platform: arm-linux-gnu
6
6
  authors:
7
7
  - Garen Torikian
8
8
  - Ashe Connor
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-08-24 00:00:00.000000000 Z
11
+ date: 2026-10-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A fast, safe, extensible parser for CommonMark. This wraps the comrak
14
14
  Rust crate.
@@ -25,6 +25,7 @@ files:
25
25
  - lib/commonmarker/4.0/commonmarker.so
26
26
  - lib/commonmarker/config.rb
27
27
  - lib/commonmarker/constants.rb
28
+ - lib/commonmarker/errors.rb
28
29
  - lib/commonmarker/extension.rb
29
30
  - lib/commonmarker/node.rb
30
31
  - lib/commonmarker/node/ast.rb