Skip to content

Bump commonmarker from 0.23.10 to 2.6.3#877

Open
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/bundler/commonmarker-2.6.3
Open

Bump commonmarker from 0.23.10 to 2.6.3#877
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/bundler/commonmarker-2.6.3

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 26, 2026

Bumps commonmarker from 0.23.10 to 2.6.3.

Release notes

Sourced from commonmarker's releases.

v2.6.3

What's Changed

New Contributors

Full Changelog: gjtorikian/commonmarker@v2.6.2...v2.6.3

v2.6.2

What's Changed

Full Changelog: gjtorikian/commonmarker@v2.6.1...v2.6.2

v2.6.1

What's Changed

Full Changelog: gjtorikian/commonmarker@v2.6.0...v2.6.1

v2.6.0

What's Changed

Full Changelog: gjtorikian/commonmarker@v2.5.0...v2.6.0

v2.5.0

What's Changed

... (truncated)

Changelog

Sourced from commonmarker's changelog.

[v2.6.3] - 23-01-2026

What's Changed

New Contributors

Full Changelog: gjtorikian/commonmarker@v2.6.2...v2.6.3

[v2.6.2] - 19-01-2026

What's Changed

Full Changelog: gjtorikian/commonmarker@v2.6.1...v2.6.2

[v2.6.1] - 06-01-2026

What's Changed

Full Changelog: gjtorikian/commonmarker@v2.6.0...v2.6.1

[v2.6.0] - 03-12-2025

What's Changed

Full Changelog: gjtorikian/commonmarker@v2.5.0...v2.6.0

[v2.5.0] - 14-10-2025

What's Changed

Full Changelog: gjtorikian/commonmarker@v2.4.1...v2.5.0

[v2.4.1] - 29-09-2025

What's Changed

... (truncated)

Commits
  • f601d86 Merge pull request #439 from gjtorikian/release/v2.6.3
  • 297d0a0 [skip test] update changelog
  • 8a6afa9 Merge pull request #437 from JunichiIto/move-ignore_setext-option
  • 82a4893 bump for bugfix
  • 806eff3 add ignore_setext test
  • 904da8d Move ignore_setext to parse options
  • a494f9c Remove benchmark/progit submodule and ignore the directory
  • 461221f Remove orphaned submodule entry for benchmark/progit
  • dde8f17 Merge pull request #436 from gjtorikian/release/v2.6.2
  • 1797843 [skip test] update changelog
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [commonmarker](https://github.com/gjtorikian/commonmarker) from 0.23.10 to 2.6.3.
- [Release notes](https://github.com/gjtorikian/commonmarker/releases)
- [Changelog](https://github.com/gjtorikian/commonmarker/blob/main/CHANGELOG.md)
- [Commits](gjtorikian/commonmarker@v0.23.10...v2.6.3)

---
updated-dependencies:
- dependency-name: commonmarker
  dependency-version: 2.6.3
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies ruby Pull requests that update Ruby code labels Jan 26, 2026
@github-actions
Copy link
Contributor

4 similar comments
@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

gem compare commonmarker 0.23.10 2.6.3

Compared versions: ["0.23.10", "2.6.3"]
  DIFFERENT bindir:
    0.23.10: bin
    2.6.3: exe
  DIFFERENT date:
    0.23.10: 2023-07-31 00:00:00 UTC
    2.6.3: 2026-01-23 00:00:00 UTC
  DIFFERENT description:
    0.23.10: A fast, safe, extensible parser for CommonMark. This wraps the official libcmark library.
    2.6.3: A fast, safe, extensible parser for CommonMark. This wraps the comrak Rust crate.
  DIFFERENT executables:
    0.23.10: ["commonmarker"]
    2.6.3: []
  DIFFERENT extensions:
    0.23.10: ["ext/commonmarker/extconf.rb"]
    2.6.3: []
  DIFFERENT metadata:
    0.23.10: {"rubygems_mfa_required" => "true"}
    2.6.3: {"allowed_push_host" => "https://rubygems.org", "funding_uri" => "https://github.com/sponsors/gjtorikian/", "source_code_uri" => "https://github.com/gjtorikian/commonmarker", "rubygems_mfa_required" => "true"}
  DIFFERENT platform:
    0.23.10: ruby
    2.6.3: x86_64-linux
  DIFFERENT rdoc_options:
    0.23.10: ["-x", "ext/commonmarker/cmark/.*"]
    2.6.3: []
  DIFFERENT require_paths:
    0.23.10: ["/opt/hostedtoolcache/Ruby/4.0.1/x64/lib/ruby/gems/4.0.0/extensions/x86_64-linux/4.0.0/commonmarker-0.23.10", "lib", "ext"]
    2.6.3: ["lib"]
  DIFFERENT required_ruby_version:
    0.23.10: >= 2.6, < 4.0
    2.6.3: >= 3.2, < 4.1.dev
  DIFFERENT required_rubygems_version:
    0.23.10: >= 0
    2.6.3: >= 3.4
  DIFFERENT rubygems_version:
    0.23.10: 3.3.26
    2.6.3: 3.5.23
  DIFFERENT summary:
    0.23.10: CommonMark parser and renderer. Written in C, wrapped in Ruby.
    2.6.3: CommonMark parser and renderer. Written in Rust, wrapped in Ruby.
  DIFFERENT version:
    0.23.10: 0.23.10
    2.6.3: 2.6.3
  DIFFERENT files:
    0.23.10->2.6.3:
      * Deleted:
            Rakefile
            bin/commonmarker
            commonmarker.gemspec
            ext/commonmarker/arena.c
            ext/commonmarker/autolink.c
            ext/commonmarker/autolink.h
            ext/commonmarker/blocks.c
            ext/commonmarker/buffer.c
            ext/commonmarker/buffer.h
            ext/commonmarker/case_fold_switch.inc
            ext/commonmarker/chunk.h
            ext/commonmarker/cmark-gfm-core-extensions.h
            ext/commonmarker/cmark-gfm-extension_api.h
            ext/commonmarker/cmark-gfm-extensions_export.h
            ext/commonmarker/cmark-gfm.h
            ext/commonmarker/cmark-gfm_export.h
            ext/commonmarker/cmark-gfm_version.h
            ext/commonmarker/cmark.c
            ext/commonmarker/cmark_ctype.c
            ext/commonmarker/cmark_ctype.h
            ext/commonmarker/commonmark.c
            ext/commonmarker/commonmarker.c
            ext/commonmarker/commonmarker.h
            ext/commonmarker/config.h
            ext/commonmarker/core-extensions.c
            ext/commonmarker/entities.inc
            ext/commonmarker/ext_scanners.c
            ext/commonmarker/ext_scanners.h
            ext/commonmarker/extconf.rb
            ext/commonmarker/footnotes.c
            ext/commonmarker/footnotes.h
            ext/commonmarker/houdini.h
            ext/commonmarker/houdini_href_e.c
            ext/commonmarker/houdini_html_e.c
            ext/commonmarker/houdini_html_u.c
            ext/commonmarker/html.c
            ext/commonmarker/html.h
            ext/commonmarker/inlines.c
            ext/commonmarker/inlines.h
            ext/commonmarker/iterator.c
            ext/commonmarker/iterator.h
            ext/commonmarker/latex.c
            ext/commonmarker/linked_list.c
            ext/commonmarker/man.c
            ext/commonmarker/map.c
            ext/commonmarker/map.h
            ext/commonmarker/node.c
            ext/commonmarker/node.h
            ext/commonmarker/parser.h
            ext/commonmarker/plaintext.c
            ext/commonmarker/plugin.c
            ext/commonmarker/plugin.h
            ext/commonmarker/references.c
            ext/commonmarker/references.h
            ext/commonmarker/registry.c
            ext/commonmarker/registry.h
            ext/commonmarker/render.c
            ext/commonmarker/render.h
            ext/commonmarker/scanners.c
            ext/commonmarker/scanners.h
            ext/commonmarker/scanners.re
            ext/commonmarker/strikethrough.c
            ext/commonmarker/strikethrough.h
            ext/commonmarker/syntax_extension.c
            ext/commonmarker/syntax_extension.h
            ext/commonmarker/table.c
            ext/commonmarker/table.h
            ext/commonmarker/tagfilter.c
            ext/commonmarker/tagfilter.h
            ext/commonmarker/tasklist.c
            ext/commonmarker/tasklist.h
            ext/commonmarker/utf8.c
            ext/commonmarker/utf8.h
            ext/commonmarker/xml.c
            lib/commonmarker/renderer/html_renderer.rb
      * Added:
            lib/commonmarker/3.2/commonmarker.so 
              (!) Unexpected permissions: 100755
              (!) File is executable
            lib/commonmarker/3.3/commonmarker.so 
              (!) Unexpected permissions: 100755
              (!) File is executable
            lib/commonmarker/3.4/commonmarker.so 
              (!) Unexpected permissions: 100755
              (!) File is executable
            lib/commonmarker/4.0/commonmarker.so 
              (!) Unexpected permissions: 100755
              (!) File is executable
            lib/commonmarker/constants.rb +7/-0
            lib/commonmarker/extension.rb +14/-0
            lib/commonmarker/node/ast.rb +8/-0
            lib/commonmarker/utils.rb +22/-0
      * Changed:
            README.md +245/-174
            lib/commonmarker.rb +27/-25
              (!) Shebang probably lost: #!/usr/bin/env ruby
            lib/commonmarker/config.rb +98/-40
            lib/commonmarker/node.rb +29/-47
            lib/commonmarker/node/inspect.rb +14/-4
            lib/commonmarker/renderer.rb +1/-127
            lib/commonmarker/version.rb +2/-2
  DIFFERENT development dependencies:
    0.23.10->2.6.3:
      * Deleted:
            awesome_print [">= 0"] (development)
            json ["~> 2.3"] (development)
            minitest ["~> 5.6"] (development)
            minitest-focus ["~> 1.1"] (development)
            rdoc ["~> 6.2"] (development)
            rubocop [">= 0"] (development)
            rubocop-standard [">= 0"] (development)
      * Updated:
            rake from: [">= 0"] to: ["~> 13.0"]
            rake-compiler from: ["~> 0.9"] to: ["~> 1.2"]

2 similar comments
@github-actions
Copy link
Contributor

gem compare commonmarker 0.23.10 2.6.3

Compared versions: ["0.23.10", "2.6.3"]
  DIFFERENT bindir:
    0.23.10: bin
    2.6.3: exe
  DIFFERENT date:
    0.23.10: 2023-07-31 00:00:00 UTC
    2.6.3: 2026-01-23 00:00:00 UTC
  DIFFERENT description:
    0.23.10: A fast, safe, extensible parser for CommonMark. This wraps the official libcmark library.
    2.6.3: A fast, safe, extensible parser for CommonMark. This wraps the comrak Rust crate.
  DIFFERENT executables:
    0.23.10: ["commonmarker"]
    2.6.3: []
  DIFFERENT extensions:
    0.23.10: ["ext/commonmarker/extconf.rb"]
    2.6.3: []
  DIFFERENT metadata:
    0.23.10: {"rubygems_mfa_required" => "true"}
    2.6.3: {"allowed_push_host" => "https://rubygems.org", "funding_uri" => "https://github.com/sponsors/gjtorikian/", "source_code_uri" => "https://github.com/gjtorikian/commonmarker", "rubygems_mfa_required" => "true"}
  DIFFERENT platform:
    0.23.10: ruby
    2.6.3: x86_64-linux
  DIFFERENT rdoc_options:
    0.23.10: ["-x", "ext/commonmarker/cmark/.*"]
    2.6.3: []
  DIFFERENT require_paths:
    0.23.10: ["/opt/hostedtoolcache/Ruby/4.0.1/x64/lib/ruby/gems/4.0.0/extensions/x86_64-linux/4.0.0/commonmarker-0.23.10", "lib", "ext"]
    2.6.3: ["lib"]
  DIFFERENT required_ruby_version:
    0.23.10: >= 2.6, < 4.0
    2.6.3: >= 3.2, < 4.1.dev
  DIFFERENT required_rubygems_version:
    0.23.10: >= 0
    2.6.3: >= 3.4
  DIFFERENT rubygems_version:
    0.23.10: 3.3.26
    2.6.3: 3.5.23
  DIFFERENT summary:
    0.23.10: CommonMark parser and renderer. Written in C, wrapped in Ruby.
    2.6.3: CommonMark parser and renderer. Written in Rust, wrapped in Ruby.
  DIFFERENT version:
    0.23.10: 0.23.10
    2.6.3: 2.6.3
  DIFFERENT files:
    0.23.10->2.6.3:
      * Deleted:
            Rakefile
            bin/commonmarker
            commonmarker.gemspec
            ext/commonmarker/arena.c
            ext/commonmarker/autolink.c
            ext/commonmarker/autolink.h
            ext/commonmarker/blocks.c
            ext/commonmarker/buffer.c
            ext/commonmarker/buffer.h
            ext/commonmarker/case_fold_switch.inc
            ext/commonmarker/chunk.h
            ext/commonmarker/cmark-gfm-core-extensions.h
            ext/commonmarker/cmark-gfm-extension_api.h
            ext/commonmarker/cmark-gfm-extensions_export.h
            ext/commonmarker/cmark-gfm.h
            ext/commonmarker/cmark-gfm_export.h
            ext/commonmarker/cmark-gfm_version.h
            ext/commonmarker/cmark.c
            ext/commonmarker/cmark_ctype.c
            ext/commonmarker/cmark_ctype.h
            ext/commonmarker/commonmark.c
            ext/commonmarker/commonmarker.c
            ext/commonmarker/commonmarker.h
            ext/commonmarker/config.h
            ext/commonmarker/core-extensions.c
            ext/commonmarker/entities.inc
            ext/commonmarker/ext_scanners.c
            ext/commonmarker/ext_scanners.h
            ext/commonmarker/extconf.rb
            ext/commonmarker/footnotes.c
            ext/commonmarker/footnotes.h
            ext/commonmarker/houdini.h
            ext/commonmarker/houdini_href_e.c
            ext/commonmarker/houdini_html_e.c
            ext/commonmarker/houdini_html_u.c
            ext/commonmarker/html.c
            ext/commonmarker/html.h
            ext/commonmarker/inlines.c
            ext/commonmarker/inlines.h
            ext/commonmarker/iterator.c
            ext/commonmarker/iterator.h
            ext/commonmarker/latex.c
            ext/commonmarker/linked_list.c
            ext/commonmarker/man.c
            ext/commonmarker/map.c
            ext/commonmarker/map.h
            ext/commonmarker/node.c
            ext/commonmarker/node.h
            ext/commonmarker/parser.h
            ext/commonmarker/plaintext.c
            ext/commonmarker/plugin.c
            ext/commonmarker/plugin.h
            ext/commonmarker/references.c
            ext/commonmarker/references.h
            ext/commonmarker/registry.c
            ext/commonmarker/registry.h
            ext/commonmarker/render.c
            ext/commonmarker/render.h
            ext/commonmarker/scanners.c
            ext/commonmarker/scanners.h
            ext/commonmarker/scanners.re
            ext/commonmarker/strikethrough.c
            ext/commonmarker/strikethrough.h
            ext/commonmarker/syntax_extension.c
            ext/commonmarker/syntax_extension.h
            ext/commonmarker/table.c
            ext/commonmarker/table.h
            ext/commonmarker/tagfilter.c
            ext/commonmarker/tagfilter.h
            ext/commonmarker/tasklist.c
            ext/commonmarker/tasklist.h
            ext/commonmarker/utf8.c
            ext/commonmarker/utf8.h
            ext/commonmarker/xml.c
            lib/commonmarker/renderer/html_renderer.rb
      * Added:
            lib/commonmarker/3.2/commonmarker.so 
              (!) Unexpected permissions: 100755
              (!) File is executable
            lib/commonmarker/3.3/commonmarker.so 
              (!) Unexpected permissions: 100755
              (!) File is executable
            lib/commonmarker/3.4/commonmarker.so 
              (!) Unexpected permissions: 100755
              (!) File is executable
            lib/commonmarker/4.0/commonmarker.so 
              (!) Unexpected permissions: 100755
              (!) File is executable
            lib/commonmarker/constants.rb +7/-0
            lib/commonmarker/extension.rb +14/-0
            lib/commonmarker/node/ast.rb +8/-0
            lib/commonmarker/utils.rb +22/-0
      * Changed:
            README.md +245/-174
            lib/commonmarker.rb +27/-25
              (!) Shebang probably lost: #!/usr/bin/env ruby
            lib/commonmarker/config.rb +98/-40
            lib/commonmarker/node.rb +29/-47
            lib/commonmarker/node/inspect.rb +14/-4
            lib/commonmarker/renderer.rb +1/-127
            lib/commonmarker/version.rb +2/-2
  DIFFERENT development dependencies:
    0.23.10->2.6.3:
      * Deleted:
            awesome_print [">= 0"] (development)
            json ["~> 2.3"] (development)
            minitest ["~> 5.6"] (development)
            minitest-focus ["~> 1.1"] (development)
            rdoc ["~> 6.2"] (development)
            rubocop [">= 0"] (development)
            rubocop-standard [">= 0"] (development)
      * Updated:
            rake from: [">= 0"] to: ["~> 13.0"]
            rake-compiler from: ["~> 0.9"] to: ["~> 1.2"]

@github-actions
Copy link
Contributor

gem compare commonmarker 0.23.10 2.6.3

Compared versions: ["0.23.10", "2.6.3"]
  DIFFERENT bindir:
    0.23.10: bin
    2.6.3: exe
  DIFFERENT date:
    0.23.10: 2023-07-31 00:00:00 UTC
    2.6.3: 2026-01-23 00:00:00 UTC
  DIFFERENT description:
    0.23.10: A fast, safe, extensible parser for CommonMark. This wraps the official libcmark library.
    2.6.3: A fast, safe, extensible parser for CommonMark. This wraps the comrak Rust crate.
  DIFFERENT executables:
    0.23.10: ["commonmarker"]
    2.6.3: []
  DIFFERENT extensions:
    0.23.10: ["ext/commonmarker/extconf.rb"]
    2.6.3: []
  DIFFERENT metadata:
    0.23.10: {"rubygems_mfa_required" => "true"}
    2.6.3: {"allowed_push_host" => "https://rubygems.org", "funding_uri" => "https://github.com/sponsors/gjtorikian/", "source_code_uri" => "https://github.com/gjtorikian/commonmarker", "rubygems_mfa_required" => "true"}
  DIFFERENT platform:
    0.23.10: ruby
    2.6.3: x86_64-linux
  DIFFERENT rdoc_options:
    0.23.10: ["-x", "ext/commonmarker/cmark/.*"]
    2.6.3: []
  DIFFERENT require_paths:
    0.23.10: ["/opt/hostedtoolcache/Ruby/4.0.1/x64/lib/ruby/gems/4.0.0/extensions/x86_64-linux/4.0.0/commonmarker-0.23.10", "lib", "ext"]
    2.6.3: ["lib"]
  DIFFERENT required_ruby_version:
    0.23.10: >= 2.6, < 4.0
    2.6.3: >= 3.2, < 4.1.dev
  DIFFERENT required_rubygems_version:
    0.23.10: >= 0
    2.6.3: >= 3.4
  DIFFERENT rubygems_version:
    0.23.10: 3.3.26
    2.6.3: 3.5.23
  DIFFERENT summary:
    0.23.10: CommonMark parser and renderer. Written in C, wrapped in Ruby.
    2.6.3: CommonMark parser and renderer. Written in Rust, wrapped in Ruby.
  DIFFERENT version:
    0.23.10: 0.23.10
    2.6.3: 2.6.3
  DIFFERENT files:
    0.23.10->2.6.3:
      * Deleted:
            Rakefile
            bin/commonmarker
            commonmarker.gemspec
            ext/commonmarker/arena.c
            ext/commonmarker/autolink.c
            ext/commonmarker/autolink.h
            ext/commonmarker/blocks.c
            ext/commonmarker/buffer.c
            ext/commonmarker/buffer.h
            ext/commonmarker/case_fold_switch.inc
            ext/commonmarker/chunk.h
            ext/commonmarker/cmark-gfm-core-extensions.h
            ext/commonmarker/cmark-gfm-extension_api.h
            ext/commonmarker/cmark-gfm-extensions_export.h
            ext/commonmarker/cmark-gfm.h
            ext/commonmarker/cmark-gfm_export.h
            ext/commonmarker/cmark-gfm_version.h
            ext/commonmarker/cmark.c
            ext/commonmarker/cmark_ctype.c
            ext/commonmarker/cmark_ctype.h
            ext/commonmarker/commonmark.c
            ext/commonmarker/commonmarker.c
            ext/commonmarker/commonmarker.h
            ext/commonmarker/config.h
            ext/commonmarker/core-extensions.c
            ext/commonmarker/entities.inc
            ext/commonmarker/ext_scanners.c
            ext/commonmarker/ext_scanners.h
            ext/commonmarker/extconf.rb
            ext/commonmarker/footnotes.c
            ext/commonmarker/footnotes.h
            ext/commonmarker/houdini.h
            ext/commonmarker/houdini_href_e.c
            ext/commonmarker/houdini_html_e.c
            ext/commonmarker/houdini_html_u.c
            ext/commonmarker/html.c
            ext/commonmarker/html.h
            ext/commonmarker/inlines.c
            ext/commonmarker/inlines.h
            ext/commonmarker/iterator.c
            ext/commonmarker/iterator.h
            ext/commonmarker/latex.c
            ext/commonmarker/linked_list.c
            ext/commonmarker/man.c
            ext/commonmarker/map.c
            ext/commonmarker/map.h
            ext/commonmarker/node.c
            ext/commonmarker/node.h
            ext/commonmarker/parser.h
            ext/commonmarker/plaintext.c
            ext/commonmarker/plugin.c
            ext/commonmarker/plugin.h
            ext/commonmarker/references.c
            ext/commonmarker/references.h
            ext/commonmarker/registry.c
            ext/commonmarker/registry.h
            ext/commonmarker/render.c
            ext/commonmarker/render.h
            ext/commonmarker/scanners.c
            ext/commonmarker/scanners.h
            ext/commonmarker/scanners.re
            ext/commonmarker/strikethrough.c
            ext/commonmarker/strikethrough.h
            ext/commonmarker/syntax_extension.c
            ext/commonmarker/syntax_extension.h
            ext/commonmarker/table.c
            ext/commonmarker/table.h
            ext/commonmarker/tagfilter.c
            ext/commonmarker/tagfilter.h
            ext/commonmarker/tasklist.c
            ext/commonmarker/tasklist.h
            ext/commonmarker/utf8.c
            ext/commonmarker/utf8.h
            ext/commonmarker/xml.c
            lib/commonmarker/renderer/html_renderer.rb
      * Added:
            lib/commonmarker/3.2/commonmarker.so 
              (!) Unexpected permissions: 100755
              (!) File is executable
            lib/commonmarker/3.3/commonmarker.so 
              (!) Unexpected permissions: 100755
              (!) File is executable
            lib/commonmarker/3.4/commonmarker.so 
              (!) Unexpected permissions: 100755
              (!) File is executable
            lib/commonmarker/4.0/commonmarker.so 
              (!) Unexpected permissions: 100755
              (!) File is executable
            lib/commonmarker/constants.rb +7/-0
            lib/commonmarker/extension.rb +14/-0
            lib/commonmarker/node/ast.rb +8/-0
            lib/commonmarker/utils.rb +22/-0
      * Changed:
            README.md +245/-174
            lib/commonmarker.rb +27/-25
              (!) Shebang probably lost: #!/usr/bin/env ruby
            lib/commonmarker/config.rb +98/-40
            lib/commonmarker/node.rb +29/-47
            lib/commonmarker/node/inspect.rb +14/-4
            lib/commonmarker/renderer.rb +1/-127
            lib/commonmarker/version.rb +2/-2
  DIFFERENT development dependencies:
    0.23.10->2.6.3:
      * Deleted:
            awesome_print [">= 0"] (development)
            json ["~> 2.3"] (development)
            minitest ["~> 5.6"] (development)
            minitest-focus ["~> 1.1"] (development)
            rdoc ["~> 6.2"] (development)
            rubocop [">= 0"] (development)
            rubocop-standard [">= 0"] (development)
      * Updated:
            rake from: [">= 0"] to: ["~> 13.0"]
            rake-compiler from: ["~> 0.9"] to: ["~> 1.2"]

@github-actions
Copy link
Contributor

gem compare --diff commonmarker 0.23.10 2.6.3

Compared versions: ["0.23.10", "2.6.3"]
  DIFFERENT files:
    0.23.10->2.6.3:
      * Deleted:
            Rakefile
            bin/commonmarker
            commonmarker.gemspec
            ext/commonmarker/arena.c
            ext/commonmarker/autolink.c
            ext/commonmarker/autolink.h
            ext/commonmarker/blocks.c
            ext/commonmarker/buffer.c
            ext/commonmarker/buffer.h
            ext/commonmarker/case_fold_switch.inc
            ext/commonmarker/chunk.h
            ext/commonmarker/cmark-gfm-core-extensions.h
            ext/commonmarker/cmark-gfm-extension_api.h
            ext/commonmarker/cmark-gfm-extensions_export.h
            ext/commonmarker/cmark-gfm.h
            ext/commonmarker/cmark-gfm_export.h
            ext/commonmarker/cmark-gfm_version.h
            ext/commonmarker/cmark.c
            ext/commonmarker/cmark_ctype.c
            ext/commonmarker/cmark_ctype.h
            ext/commonmarker/commonmark.c
            ext/commonmarker/commonmarker.c
            ext/commonmarker/commonmarker.h
            ext/commonmarker/config.h
            ext/commonmarker/core-extensions.c
            ext/commonmarker/entities.inc
            ext/commonmarker/ext_scanners.c
            ext/commonmarker/ext_scanners.h
            ext/commonmarker/extconf.rb
            ext/commonmarker/footnotes.c
            ext/commonmarker/footnotes.h
            ext/commonmarker/houdini.h
            ext/commonmarker/houdini_href_e.c
            ext/commonmarker/houdini_html_e.c
            ext/commonmarker/houdini_html_u.c
            ext/commonmarker/html.c
            ext/commonmarker/html.h
            ext/commonmarker/inlines.c
            ext/commonmarker/inlines.h
            ext/commonmarker/iterator.c
            ext/commonmarker/iterator.h
            ext/commonmarker/latex.c
            ext/commonmarker/linked_list.c
            ext/commonmarker/man.c
            ext/commonmarker/map.c
            ext/commonmarker/map.h
            ext/commonmarker/node.c
            ext/commonmarker/node.h
            ext/commonmarker/parser.h
            ext/commonmarker/plaintext.c
            ext/commonmarker/plugin.c
            ext/commonmarker/plugin.h
            ext/commonmarker/references.c
            ext/commonmarker/references.h
            ext/commonmarker/registry.c
            ext/commonmarker/registry.h
            ext/commonmarker/render.c
            ext/commonmarker/render.h
            ext/commonmarker/scanners.c
            ext/commonmarker/scanners.h
            ext/commonmarker/scanners.re
            ext/commonmarker/strikethrough.c
            ext/commonmarker/strikethrough.h
            ext/commonmarker/syntax_extension.c
            ext/commonmarker/syntax_extension.h
            ext/commonmarker/table.c
            ext/commonmarker/table.h
            ext/commonmarker/tagfilter.c
            ext/commonmarker/tagfilter.h
            ext/commonmarker/tasklist.c
            ext/commonmarker/tasklist.h
            ext/commonmarker/utf8.c
            ext/commonmarker/utf8.h
            ext/commonmarker/xml.c
            lib/commonmarker/renderer/html_renderer.rb
      * Added:
              (!) Unexpected permissions: 100755
              (!) File is executable
              (!) Unexpected permissions: 100755
              (!) File is executable
              (!) Unexpected permissions: 100755
              (!) File is executable
              (!) Unexpected permissions: 100755
              (!) File is executable
        lib/commonmarker/3.2/commonmarker.so
                Binary files /tmp/20260126-549-v9467j and /tmp/d20260126-549-jxj84d/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/3.2/commonmarker.so differ
        lib/commonmarker/3.3/commonmarker.so
                Binary files /tmp/20260126-549-4dq3ym and /tmp/d20260126-549-jxj84d/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/3.3/commonmarker.so differ
        lib/commonmarker/3.4/commonmarker.so
                Binary files /tmp/20260126-549-esxckt and /tmp/d20260126-549-jxj84d/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/3.4/commonmarker.so differ
        lib/commonmarker/4.0/commonmarker.so
                Binary files /tmp/20260126-549-r5veap and /tmp/d20260126-549-jxj84d/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/4.0/commonmarker.so differ
        lib/commonmarker/constants.rb
                --- /tmp/20260126-549-6syqiv	2026-01-26 03:34:14.446050806 +0000
                +++ /tmp/d20260126-549-jxj84d/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/constants.rb	2026-01-26 03:34:14.315049744 +0000
                @@ -0,0 +1,7 @@
                +# frozen_string_literal: true
                +
                +module Commonmarker
                +  module Constants
                +    BOOLS = [true, false].freeze
                +  end
                +end
        lib/commonmarker/extension.rb
                --- /tmp/20260126-549-9ttpuo	2026-01-26 03:34:14.447050814 +0000
                +++ /tmp/d20260126-549-jxj84d/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/extension.rb	2026-01-26 03:34:14.315049744 +0000
                @@ -0,0 +1,14 @@
                +# frozen_string_literal: true
                +
                +begin
                +  # native precompiled gems package shared libraries in <gem_dir>/lib/commonmarker/<ruby_version>
                +  # load the precompiled extension file
                +  ruby_version = /\d+\.\d+/.match(RUBY_VERSION)
                +  require_relative "#{ruby_version}/commonmarker"
                +rescue LoadError
                +  # fall back to the extension compiled upon installation.
                +  # use "require" instead of "require_relative" because non-native gems will place C extension files
                +  # in Gem::BasicSpecification#extension_dir after compilation (during normal installation), which
                +  # is in $LOAD_PATH but not necessarily relative to this file (see nokogiri#2300)
                +  require "commonmarker/commonmarker"
                +end
        lib/commonmarker/node/ast.rb
                --- /tmp/20260126-549-osg0hh	2026-01-26 03:34:14.448050822 +0000
                +++ /tmp/d20260126-549-jxj84d/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/node/ast.rb	2026-01-26 03:34:14.315049744 +0000
                @@ -0,0 +1,8 @@
                +# frozen_string_literal: true
                +
                +module Commonmarker
                +  class Node
                +    class Ast
                +    end
                +  end
                +end
        lib/commonmarker/utils.rb
                --- /tmp/20260126-549-iw2ole	2026-01-26 03:34:14.449050831 +0000
                +++ /tmp/d20260126-549-jxj84d/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/utils.rb	2026-01-26 03:34:14.315049744 +0000
                @@ -0,0 +1,22 @@
                +# frozen_string_literal: true
                +
                +require "commonmarker/constants"
                +
                +module Commonmarker
                +  module Utils
                +    include Commonmarker::Constants
                +
                +    def fetch_kv(options, key, value, type)
                +      value_klass = value.class
                +
                +      if Constants::BOOLS.include?(value) && BOOLS.include?(options[key])
                +        options[key]
                +      elsif options[key].is_a?(value_klass)
                +        options[key]
                +      else
                +        expected_type = Constants::BOOLS.include?(value) ? "Boolean" : value_klass.to_s
                +        raise TypeError, "#{type} option `:#{key}` must be #{expected_type}; got #{options[key].class}"
                +      end
                +    end
                +  end
                +end
      * Changed:
              (!) Shebang probably lost: #!/usr/bin/env ruby
        README.md
                --- /tmp/d20260126-549-jxj84d/commonmarker-0.23.10/README.md	2026-01-26 03:34:14.152048422 +0000
                +++ /tmp/d20260126-549-jxj84d/commonmarker-2.6.3-x86_64-linux/README.md	2026-01-26 03:34:14.200048811 +0000
                @@ -1 +1 @@
                -# CommonMarker
                +# Commonmarker
                @@ -3 +3 @@
                -![Build Status](https://github.com/gjtorikian/commonmarker/workflows/CI/badge.svg) [![Gem Version](https://badge.fury.io/rb/commonmarker.svg)](http://badge.fury.io/rb/commonmarker)
                +Ruby wrapper for Rust's [comrak](https://github.com/kivikakk/comrak) crate.
                @@ -5,2 +5 @@
                -Ruby wrapper for [libcmark-gfm](https://github.com/github/cmark),
                -GitHub's fork of the reference parser for CommonMark. It passes all of the C tests, 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.
                +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.
                @@ -8 +7,4 @@
                -For more information on available extensions, see [the documentation below](#extensions).
                +> [!NOTE]
                +> By default, several extensions not in any spec have been enabled, for the sake of end user convenience when generating HTML.
                +>
                +> For more information on the available options and extensions, see [the documentation below](#options-and-plugins).
                @@ -25,0 +28,2 @@
                +This gem expects to receive UTF-8 strings. Ensure your strings are the right encoding before passing them into `Commonmarker`.
                +
                @@ -28 +32 @@
                -Call `render_html` on a string to convert it to HTML:
                +Call `to_html` on a string to convert it to HTML:
                @@ -30 +34 @@
                -``` ruby
                +```ruby
                @@ -32,2 +36,4 @@
                -CommonMarker.render_html('Hi *there*', :DEFAULT)
                -# <p>Hi <em>there</em></p>\n
                +Commonmarker.to_html('"Hi *there*"', options: {
                +    parse: { smart: true }
                +})
                +# => <p>“Hi <em>there</em>”</p>\n
                @@ -36 +42 @@
                -The second argument is optional--[see below](#options) for more information.
                +(The second argument is optional--[see below](#options-and-plugins) for more information.)
                @@ -40 +46 @@
                -You can also parse a string to receive a `Document` node. You can then print that node to HTML, iterate over the children, and other fun node stuff. For example:
                +You can also parse a string to receive a `:document` node. You can then print that node to HTML, iterate over the children, and do other fun node stuff. For example:
                @@ -42 +48 @@
                -``` ruby
                +```ruby
                @@ -45,2 +51,4 @@
                -doc = CommonMarker.render_doc('*Hello* world', :DEFAULT)
                -puts(doc.to_html) # <p>Hi <em>there</em></p>\n
                +doc = Commonmarker.parse("*Hello* world", options: {
                +    parse: { smart: true }
                +})
                +puts(doc.to_html) # => <p><em>Hello</em> world</p>\n
                @@ -49 +57 @@
                -  puts node.type # [:document, :paragraph, :text, :emph, :text]
                +  puts node.type # => [:document, :paragraph, :emph, :text, :text]
                @@ -53 +61,27 @@
                -The second argument is optional--[see below](#options) for more information.
                +(The second argument is optional--[see below](#options-and-plugins) for more information.)
                +
                +When it comes to modifying the document, you can perform the following operations:
                +
                +- `insert_before`
                +- `insert_after`
                +- `prepend_child`
                +- `append_child`
                +- `delete`
                +
                +You can also get the source position of a node by calling `source_position`:
                +
                +```ruby
                +doc = Commonmarker.parse("*Hello* world")
                +puts doc.first_child.first_child.source_position
                +# => {:start_line=>1, :start_column=>1, :end_line=>1, :end_column=>7}
                +```
                +
                +You can also modify the following attributes:
                +
                +- `url`
                +- `title`
                +- `header_level`
                +- `list_type`
                +- `list_start`
                +- `list_tight`
                +- `fence_info`
                @@ -55 +89 @@
                -#### Example: walking the AST
                +#### Example: Walking the AST
                @@ -60 +94 @@
                -- `each` will iterate on a node and its children, but no further.
                +- `each` will iterate on a node's direct children, but no further.
                @@ -62 +96 @@
                -``` ruby
                +```ruby
                @@ -65,2 +99,2 @@
                -# parse the files specified on the command line
                -doc = CommonMarker.render_doc("# The site\n\n [GitHub](https://www.github.com)")
                +# parse some string
                +doc = Commonmarker.parse("# The site\n\n [GitHub](https://www.github.com)")
                @@ -74,11 +108 @@
                -
                -# Capitalize all regular text in headers
                -doc.walk do |node|
                -  if node.type == :header
                -    node.each do |subnode|
                -      if subnode.type == :text
                -        subnode.string_content = subnode.string_content.upcase
                -      end
                -    end
                -  end
                -end
                +# => URL = https://www.github.com
                @@ -92,0 +117 @@
                +# => <h1><a href=\"#the-site\"></a>The site</h1>\n<p>GitHub</p>\n
                @@ -95 +120 @@
                -### Creating a custom renderer
                +#### Example: Converting a document back into raw CommonMark
                @@ -97 +122 @@
                -You can also derive a class from CommonMarker's `HtmlRenderer` class. This produces slower output, but is far more customizable. For example:
                +You can use `to_commonmark` on a node to render it as raw text:
                @@ -99,6 +124,2 @@
                -``` ruby
                -class MyHtmlRenderer < CommonMarker::HtmlRenderer
                -  def initialize
                -    super
                -    @headerid = 1
                -  end
                +```ruby
                +require 'commonmarker'
                @@ -106,6 +127,8 @@
                -  def header(node)
                -    block do
                -      out("<h", node.header_level, " id=\"", @headerid, "\">",
                -               :children, "</h", node.header_level, ">")
                -      @headerid += 1
                -    end
                +# parse some string
                +doc = Commonmarker.parse("# The site\n\n [GitHub](https://www.github.com)")
                +
                +# Transform links to regular text
                +doc.walk do |node|
                +  if node.type == :link
                +    node.insert_before(node.first_child)
                +    node.delete
                @@ -115,7 +138,2 @@
                -myrenderer = MyHtmlRenderer.new
                -puts myrenderer.render(doc)
                -
                -# Print any warnings to STDERR
                -renderer.warnings.each do |w|
                -  STDERR.write("#{w}\n")
                -end
                +doc.to_commonmark
                +# => # The site\n\nGitHub\n
                @@ -124,16 +142 @@
                -## Options
                -
                -CommonMarker accepts the same options that CMark does, as symbols. Note that there is a distinction in CMark for "parse" options and "render" options, which are represented in the tables below.
                -
                -### Parse options
                -
                -| Name                          | Description
                -| ----------------------------- | -----------
                -| `:DEFAULT`                    | The default parsing system.
                -| `:SOURCEPOS`                  | Include source position in nodes
                -| `:UNSAFE`                     | Allow raw/custom HTML and unsafe links.
                -| `:VALIDATE_UTF8`              | Replace illegal sequences with the replacement character `U+FFFD`.
                -| `:SMART`                      | Use smart punctuation (curly quotes, etc.).
                -| `:LIBERAL_HTML_TAG`           | Support liberal parsing of inline HTML tags.
                -| `:FOOTNOTES`                  | Parse footnotes.
                -| `:STRIKETHROUGH_DOUBLE_TILDE` | Parse strikethroughs by double tildes (compatibility with [redcarpet](https://github.com/vmg/redcarpet))
                +## Options and plugins
                @@ -141,17 +144 @@
                -### Render options
                -
                -| Name                             | Description                                                     |
                -| ------------------               | -----------                                                     |
                -| `:DEFAULT`                       | The default rendering system.                                   |
                -| `:SOURCEPOS`                     | Include source position in rendered HTML.                       |
                -| `:HARDBREAKS`                    | Treat `\n` as hardbreaks (by adding `<br/>`).                   |
                -| `:UNSAFE`                        | Allow raw/custom HTML and unsafe links.                         |
                -| `:NOBREAKS`                      | Translate `\n` in the source to a single whitespace.            |
                -| `:VALIDATE_UTF8`                 | Replace illegal sequences with the replacement character `U+FFFD`. |
                -| `:SMART`                         | Use smart punctuation (curly quotes, etc.).                     |
                -| `:GITHUB_PRE_LANG`               | Use GitHub-style `<pre lang>` for fenced code blocks.           |
                -| `:LIBERAL_HTML_TAG`              | Support liberal parsing of inline HTML tags.                    |
                -| `:FOOTNOTES`                     | Render footnotes.                                               |
                -| `:STRIKETHROUGH_DOUBLE_TILDE`    | Parse strikethroughs by double tildes (compatibility with [redcarpet](https://github.com/vmg/redcarpet)) |
                -| `:TABLE_PREFER_STYLE_ATTRIBUTES` | Use `style` insted of `align` for table cells.                  |
                -| `:FULL_INFO_STRING`              | Include full info strings of code blocks in separate attribute. |
                +### Options
                @@ -159 +146 @@
                -### Passing options
                +Commonmarker accepts the same parse, render, and extensions options that comrak does, as a hash dictionary with symbol keys:
                @@ -161,11 +148,5 @@
                -To apply a single option, pass it in as a symbol argument:
                -
                -``` ruby
                -CommonMarker.render_doc("\"Hello,\" said the spider.", :SMART)
                -# <p>“Hello,” said the spider.</p>\n
                -```
                -
                -To have multiple options applied, pass in an array of symbols:
                -
                -``` ruby
                -CommonMarker.render_html("\"'Shelob' is my name.\"", [:HARDBREAKS, :SOURCEPOS])
                +```ruby
                +Commonmarker.to_html('"Hi *there*"', options:{
                +  parse: { smart: true },
                +  render: { hardbreaks: false}
                +})
                @@ -174 +155 @@
                -For more information on these options, see [the CMark documentation](https://git.io/v7nh1).
                +Note that there is a distinction in comrak for "parse" options and "render" options, which are represented in the tables below. As well, if you wish to disable any-non boolean option, pass in `nil`.
                @@ -176,5 +157 @@
                -## Extensions
                -
                -Both `render_html` and `render_doc` take an optional third argument defining the extensions you want enabled as your CommonMark document is being processed. The documentation for these extensions are [defined in this spec](https://github.github.com/gfm/), and the rationale is provided [in this blog post](https://githubengineering.com/a-formal-spec-for-github-markdown/).
                -
                -The available extensions are:
                +### Parse options
                @@ -182,5 +159,8 @@
                -* `:table` - This provides support for tables.
                -* `:tasklist` - This provides support for task list items.
                -* `:strikethrough` - This provides support for strikethroughs.
                -* `:autolink` - This provides support for automatically converting URLs to anchor tags.
                -* `:tagfilter` - This escapes [several "unsafe" HTML tags](https://github.github.com/gfm/#disallowed-raw-html-extension-), causing them to not have any effect.
                +| Name                         | Description                                                                                                                                 | Default |
                +| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
                +| `smart`                      | Punctuation (quotes, full-stops and hyphens) are converted into 'smart' punctuation.                                                        | `false` |
                +| `default_info_string`        | The default info string for fenced code blocks.                                                                                             | `""`    |
                +| `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` |
                +| `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` |
                +| `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` |
                +| `ignore_setext`              | Ignores setext-style headings.                                                                                                              | `false` |
                @@ -188,3 +168 @@
                -## Output formats
                -
                -Like CMark, CommonMarker can generate output in several formats: HTML, XML, plaintext, and commonmark are currently supported.
                +### Render options
                @@ -192 +170,14 @@
                -### HTML
                +| Name                 | Description                                                                                            | Default |
                +| -------------------- | ------------------------------------------------------------------------------------------------------ | ------- |
                +| `hardbreaks`         | [Soft line breaks](http://spec.commonmark.org/0.27/#soft-line-breaks) translate into hard line breaks. | `true`  |
                +| `github_pre_lang`    | GitHub-style `<pre lang="xyz">` is used for fenced code blocks with info tags.                         | `true`  |
                +| `full_info_string`   | Gives info string data after a space in a `data-meta` attribute on code blocks.                        | `false` |
                +| `width`              | The wrap column when outputting CommonMark.                                                            | `80`    |
                +| `unsafe`             | Allow rendering of raw HTML and potentially dangerous links.                                           | `false` |
                +| `escape`             | Escape raw HTML instead of clobbering it.                                                              | `false` |
                +| `sourcepos`          | Include source position attribute in HTML and XML output.                                              | `false` |
                +| `escaped_char_spans` | Wrap escaped characters in span tags.                                                                  | `true`  |
                +| `ignore_empty_links` | Ignores empty links, leaving the Markdown text in place.                                               | `false` |
                +| `gfm_quirks`         | Outputs HTML with GFM-style quirks; namely, not nesting `<strong>` inlines.                            | `false` |
                +| `prefer_fenced`      | Always output fenced code blocks, even where an indented one could be used.                            | `false` |
                +| `tasklist_classes`   | Add CSS classes to the HTML output of the tasklist extension                                           | `false` |
                @@ -194 +185 @@
                -The default output format, HTML, will be generated when calling `to_html` or using `--to=html` on the command line.
                +As well, there are several extensions which you can toggle in the same manner:
                @@ -197,2 +188,62 @@
                -doc = CommonMarker.render_doc('*Hello* world!', :DEFAULT)
                -puts(doc.to_html)
                +Commonmarker.to_html('"Hi *there*"', options: {
                +    extension: { footnotes: true, description_lists: true },
                +    render: { hardbreaks: false }
                +})
                +```
                +
                +### Extension options
                +
                +| Name                          | Description                                                                                                         | Default |
                +| ----------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------- |
                +| `strikethrough`               | Enables the [strikethrough extension](https://github.github.com/gfm/#strikethrough-extension-) from the GFM spec.   | `true`  |
                +| `tagfilter`                   | Enables the [tagfilter extension](https://github.github.com/gfm/#disallowed-raw-html-extension-) from the GFM spec. | `true`  |
                +| `table`                       | Enables the [table extension](https://github.github.com/gfm/#tables-extension-) from the GFM spec.                  | `true`  |
                +| `autolink`                    | Enables the [autolink extension](https://github.github.com/gfm/#autolinks-extension-) from the GFM spec.            | `true`  |
                +| `tasklist`                    | Enables the [task list extension](https://github.github.com/gfm/#task-list-items-extension-) from the GFM spec.     | `true`  |
                +| `superscript`                 | Enables the superscript Comrak extension.                                                                           | `false` |
                +| `header_ids`                  | Enables the header IDs Comrak extension. from the GFM spec.                                                         | `""`    |
                +| `footnotes`                   | Enables the footnotes extension per `cmark-gfm`.                                                                    | `false` |
                +| `inline_footnotes`            | Enables the inline footnotes extension.                                                                             | `false` |
                +| `description_lists`           | Enables the description lists extension.                                                                            | `false` |
                +| `front_matter_delimiter`      | Enables the front matter extension.                                                                                 | `""`    |
                +| `multiline_block_quotes`      | Enables the multiline block quotes extension.                                                                       | `false` |
                +| `math_dollars`, `math_code`   | Enables the math extension.                                                                                         | `false` |
                +| `shortcodes`                  | Enables the shortcodes extension.                                                                                   | `true`  |
                +| `wikilinks_title_before_pipe` | Enables the wikilinks extension, placing the title before the dividing pipe.                                        | `false` |
                +| `wikilinks_title_after_pipe`  | Enables the wikilinks extension, placing the title after the dividing pipe.                                         | `false` |
                +| `underline`                   | Enables the underline extension.                                                                                    | `false` |
                +| `spoiler`                     | Enables the spoiler extension.                                                                                      | `false` |
                +| `greentext`                   | Enables the greentext extension.                                                                                    | `false` |
                +| `subtext`                     | Enables the subtext extension.                                                                                      | `false` |
                +| `subscript`                   | Enables the subscript extension.                                                                                    | `false` |
                +| `alerts`                      | Enables the alerts extension.                                                                                       | `false` |
                +| `cjk_friendly_emphasis`       | Enables the [CJK friendly emphasis](https://github.com/tats-u/markdown-cjk-friendly) extension.                     | `false` |
                +| `highlight`                   | Enables highlighting via `==`                                                                                       | `false` |
                +
                +For more information on these options, see [the comrak documentation](https://github.com/kivikakk/comrak#usage).
                +
                +### Plugins
                +
                +In addition to the possibilities provided by generic CommonMark rendering, Commonmarker also supports plugins as a means of
                +providing further niceties.
                +
                +#### Syntax Highlighter Plugin
                +
                +The library comes with [a set of pre-existing themes](https://docs.rs/syntect/5.0.0/syntect/highlighting/struct.ThemeSet.html#implementations) for highlighting code:
                +
                +- `"base16-ocean.dark"`
                +- `"base16-eighties.dark"`
                +- `"base16-mocha.dark"`
                +- `"base16-ocean.light"`
                +- `"InspiredGitHub"`
                +- `"Solarized (dark)"`
                +- `"Solarized (light)"`
                +
                +````ruby
                +code = <<~CODE
                +  ```ruby
                +  def hello
                +    puts "hello"
                +  end
                +  ```
                +CODE
                @@ -200,2 +251,2 @@
                -<p><em>Hello</em> world!</p>
                -```
                +# pass in a theme name from a pre-existing set
                +puts Commonmarker.to_html(code, plugins: { syntax_highlighter: { theme: "InspiredGitHub" } })
                @@ -203 +254,20 @@
                -### XML
                +# <pre style="background-color:#ffffff;" lang="ruby"><code>
                +# <span style="font-weight:bold;color:#a71d5d;">def </span><span style="font-weight:bold;color:#795da3;">hello
                +# </span><span style="color:#62a35c;">puts </span><span style="color:#183691;">&quot;hello&quot;
                +# </span><span style="font-weight:bold;color:#a71d5d;">end
                +# </span>
                +# </code></pre>
                +````
                +
                +By default, the plugin uses the `"base16-ocean.dark"` theme to syntax highlight code.
                +
                +To disable this plugin, set the value to `nil`:
                +
                +````ruby
                +code = <<~CODE
                +  ```ruby
                +  def hello
                +    puts "hello"
                +  end
                +  ```
                +CODE
                @@ -205 +275 @@
                -XML will be generated when calling `to_xml` or using `--to=xml` on the command line.
                +Commonmarker.to_html(code, plugins: { syntax_highlighter: nil })
                @@ -207,3 +277,15 @@
                -```ruby
                -doc = CommonMarker.render_doc('*Hello* world!', :DEFAULT)
                -puts(doc.to_xml)
                +# <pre lang="ruby"><code>def hello
                +#   puts &quot;hello&quot;
                +# end
                +# </code></pre>
                +````
                +
                +To output CSS classes instead of `style` attributes, set the `theme` key to `""`:
                +
                +````ruby
                +code = <<~CODE
                +  ```ruby
                +  def hello
                +    puts "hello"
                +  end
                +CODE
                @@ -211,11 +293 @@
                -<?xml version="1.0" encoding="UTF-8"?>
                -<!DOCTYPE document SYSTEM "CommonMark.dtd">
                -<document xmlns="http://commonmark.org/xml/1.0">
                -  <paragraph>
                -    <emph>
                -      <text xml:space="preserve">Hello</text>
                -    </emph>
                -    <text xml:space="preserve"> world!</text>
                -  </paragraph>
                -</document>
                -```
                +Commonmarker.to_html(code, plugins: { syntax_highlighter: { theme: "" } })
                @@ -223 +295,4 @@
                -### Plaintext
                +# <pre class="syntax-highlighting"><code><span class="source ruby"><span class="meta function ruby"><span class="keyword control def ruby">def</span></span><span class="meta function ruby"> # <span class="entity name function ruby">hello</span></span>
                +#   <span class="support function builtin ruby">puts</span> <span class="string quoted double ruby"><span class="punctuation definition string begin ruby">&quot;</span>hello<span class="punctuation definition string end ruby">&quot;</span></span>
                +# <span class="keyword control ruby">end</span>\n</span></code></pre>
                +````
                @@ -225 +300 @@
                -Plaintext will be generated when calling `to_plaintext` or using `--to=plaintext` on the command line.
                +To use a custom theme, you can provide a `path` to a directory containing `.tmtheme` files to load:
                @@ -228,4 +303 @@
                -doc = CommonMarker.render_doc('*Hello* world!', :DEFAULT)
                -puts(doc.to_plaintext)
                -
                -Hello world!
                +Commonmarker.to_html(code, plugins: { syntax_highlighter: { theme: "Monokai", path: "./themes" } })
                @@ -234,11 +306 @@
                -### Commonmark
                -
                -Commonmark will be generated when calling `to_commonmark` or using `--to=commonmark` on the command line.
                -
                -``` ruby
                -text = <<-TEXT
                -1. I am a numeric list.
                -2. I continue the list.
                -* Suddenly, an unordered list!
                -* What fun!
                -TEXT
                +## Output formats
                @@ -246,2 +308 @@
                -doc = CommonMarker.render_doc(text, :DEFAULT)
                -puts(doc.to_commonmark)
                +Commonmarker can currently only generate output in one format: HTML.
                @@ -249,2 +310 @@
                -1.  I am a numeric list.
                -2.  I continue the list.
                +### HTML
                @@ -252 +312,2 @@
                -<!-- end list -->
                +```ruby
                +puts Commonmarker.to_html('*Hello* world!')
                @@ -254,2 +315 @@
                -  - Suddenly, an unordered list\!
                -  - What fun\!
                +# <p><em>Hello</em> world!</p>
                @@ -267 +327 @@
                -If there were no errors, you're done! Otherwise, make sure to follow the CMark dependency instructions.
                +If there were no errors, you're done! Otherwise, make sure to follow the comrak dependency instructions.
                @@ -271,2 +330,0 @@
                -Some rough benchmarks:
                -
                @@ -274,3 +332,2 @@
                -$ bundle exec rake benchmark
                -
                -input size = 11063727 bytes
                +❯ bundle exec rake benchmark
                +input size = 11064832 bytes
                @@ -278,10 +335,24 @@
                -redcarpet
                -  0.070000   0.020000   0.090000 (  0.079641)
                -github-markdown
                -  0.070000   0.010000   0.080000 (  0.083535)
                -commonmarker with to_html
                -  0.100000   0.010000   0.110000 (  0.111947)
                -commonmarker with ruby HtmlRenderer
                -  1.830000   0.030000   1.860000 (  1.866203)
                -kramdown
                -  4.610000   0.070000   4.680000 (  4.678398)
                +ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
                +Warming up --------------------------------------
                +  Markly.render_html     1.000 i/100ms
                +Markly::Node#to_html     1.000 i/100ms
                +Commonmarker.to_html     1.000 i/100ms
                +Commonmarker::Node.to_html
                +                         1.000 i/100ms
                +Kramdown::Document#to_html
                +                         1.000 i/100ms
                +Calculating -------------------------------------
                +  Markly.render_html     15.606 (±25.6%) i/s -     71.000 in   5.047132s
                +Markly::Node#to_html     15.692 (±25.5%) i/s -     72.000 in   5.095810s
                +Commonmarker.to_html      4.482 (± 0.0%) i/s -     23.000 in   5.137680s
                +Commonmarker::Node.to_html
                +                          5.092 (±19.6%) i/s -     25.000 in   5.072220s
                +Kramdown::Document#to_html
                +                          0.379 (± 0.0%) i/s -      2.000 in   5.277770s
                +
                +Comparison:
                +Markly::Node#to_html:       15.7 i/s
                +  Markly.render_html:       15.6 i/s - same-ish: difference falls within error
                +Commonmarker::Node.to_html:        5.1 i/s - 3.08x  slower
                +Commonmarker.to_html:        4.5 i/s - 3.50x  slower
                +Kramdown::Document#to_html:        0.4 i/s - 41.40x  slower
        lib/commonmarker.rb
                --- /tmp/d20260126-549-jxj84d/commonmarker-0.23.10/lib/commonmarker.rb	2026-01-26 03:34:14.193048755 +0000
                +++ /tmp/d20260126-549-jxj84d/commonmarker-2.6.3-x86_64-linux/lib/commonmarker.rb	2026-01-26 03:34:14.200048811 +0000
                @@ -1 +0,0 @@
                -#!/usr/bin/env ruby
                @@ -4,2 +3,3 @@
                -require "commonmarker/commonmarker"
                -require "commonmarker/config"
                +require_relative "commonmarker/extension"
                +
                +require "commonmarker/utils"
                @@ -6,0 +7 @@
                +require "commonmarker/config"
                @@ -8 +8,0 @@
                -require "commonmarker/renderer/html_renderer"
                @@ -11,4 +11 @@
                -begin
                -  require "awesome_print"
                -rescue LoadError; end # rubocop:disable Lint/SuppressedException
                -module CommonMarker
                +module Commonmarker
                @@ -16 +13 @@
                -    # Public:  Parses a Markdown string into an HTML string.
                +    # Public: Parses a CommonMark string into an HTML string.
                @@ -19,2 +16 @@
                -    # option - Either a {Symbol} or {Array of Symbol}s indicating the render options
                -    # extensions - An {Array of Symbol}s indicating the extensions to use
                +    # options - A {Hash} of render, parse, and extension options to transform the text.
                @@ -22,2 +18,2 @@
                -    # Returns a {String} of converted HTML.
                -    def render_html(text, options = :DEFAULT, extensions = [])
                +    # Returns the `parser` node.
                +    def parse(text, options: Commonmarker::Config::OPTIONS)
                @@ -24,0 +21,2 @@
                +      raise TypeError, "text must be UTF-8 encoded; got #{text.encoding}!" unless text.encoding.name == "UTF-8"
                +      raise TypeError, "options must be a Hash; got a #{options.class}!" unless options.is_a?(Hash)
                @@ -26,2 +24,3 @@
                -      opts = Config.process_options(options, :render)
                -      Node.markdown_to_html(text.encode("UTF-8"), opts, extensions)
                +      opts = Config.process_options(options)
                +
                +      commonmark_parse(text, parse: opts.fetch(:parse, {}), render: opts.fetch(:render, {}), extension: opts.fetch(:extension, {}))
                @@ -30 +29 @@
                -    # Public: Parses a Markdown string into a `document` node.
                +    # Public: Parses a CommonMark string into an HTML string.
                @@ -32,3 +31,3 @@
                -    # string - {String} to be parsed
                -    # option - A {Symbol} or {Array of Symbol}s indicating the parse options
                -    # extensions - An {Array of Symbol}s indicating the extensions to use
                +    # text - A {String} of text
                +    # options - A {Hash} of render, parse, and extension options to transform the text.
                +    # plugins - A {Hash} of additional plugins.
                @@ -36,2 +35,2 @@
                -    # Returns the `document` node.
                -    def render_doc(text, options = :DEFAULT, extensions = [])
                +    # Returns a {String} of converted HTML.
                +    def to_html(text, options: Commonmarker::Config::OPTIONS, plugins: Commonmarker::Config::PLUGINS)
                @@ -38,0 +38,5 @@
                +      raise TypeError, "text must be UTF-8 encoded; got #{text.encoding}!" unless text.encoding.name == "UTF-8"
                +      raise TypeError, "options must be a Hash; got a #{options.class}!" unless options.is_a?(Hash)
                +
                +      opts = Config.process_options(options)
                +      plugins = Config.process_plugins(plugins)
                @@ -40,3 +44 @@
                -      opts = Config.process_options(options, :parse)
                -      text = text.encode("UTF-8")
                -      Node.parse_document(text, text.bytesize, opts, extensions)
                +      commonmark_to_html(text, parse: opts.fetch(:parse, {}), render: opts.fetch(:render, {}), extension: opts.fetch(:extension, {}), plugins: plugins)
                @@ -44 +46 @@
                -end
                +  end
        lib/commonmarker/config.rb
                --- /tmp/d20260126-549-jxj84d/commonmarker-0.23.10/lib/commonmarker/config.rb	2026-01-26 03:34:14.193048755 +0000
                +++ /tmp/d20260126-549-jxj84d/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/config.rb	2026-01-26 03:34:14.315049744 +0000
                @@ -3,2 +3 @@
                -module CommonMarker
                -  # For Ruby::Enum, these must be classes, not modules
                +module Commonmarker
                @@ -6,2 +5,3 @@
                -    # See https://github.com/github/cmark-gfm/blob/master/src/cmark-gfm.h#L673
                -    OPTS = {
                +    # For details, see
                +    # https://github.com/kivikakk/comrak/blob/162ef9354deb2c9b4a4e05be495aa372ba5bb696/src/main.rs#L201
                +    OPTIONS = {
                @@ -9,8 +9,6 @@
                -        DEFAULT: 0,
                -        SOURCEPOS: (1 << 1),
                -        UNSAFE: (1 << 17),
                -        VALIDATE_UTF8: (1 << 9),
                -        SMART: (1 << 10),
                -        LIBERAL_HTML_TAG: (1 << 12),
                -        FOOTNOTES: (1 << 13),
                -        STRIKETHROUGH_DOUBLE_TILDE: (1 << 14),
                +        smart: false,
                +        default_info_string: "",
                +        relaxed_tasklist_matching: false,
                +        relaxed_autolinks: false,
                +        leave_footnote_definitions: false,
                +        ignore_setext: false,
                @@ -19,13 +17,12 @@
                -        DEFAULT: 0,
                -        SOURCEPOS: (1 << 1),
                -        HARDBREAKS: (1 << 2),
                -        UNSAFE: (1 << 17),
                -        NOBREAKS: (1 << 4),
                -        VALIDATE_UTF8: (1 << 9),
                -        SMART: (1 << 10),
                -        GITHUB_PRE_LANG: (1 << 11),
                -        LIBERAL_HTML_TAG: (1 << 12),
                -        FOOTNOTES: (1 << 13),
                -        STRIKETHROUGH_DOUBLE_TILDE: (1 << 14),
                -        TABLE_PREFER_STYLE_ATTRIBUTES: (1 << 15),
                -        FULL_INFO_STRING: (1 << 16),
                +        hardbreaks: true,
                +        github_pre_lang: true,
                +        full_info_string: false,
                +        width: 80,
                +        unsafe: false,
                +        escape: false,
                +        sourcepos: false,
                +        escaped_char_spans: true,
                +        ignore_empty_links: false,
                +        gfm_quirks: false,
                +        prefer_fenced: false,
                +        tasklist_classes: false,
                @@ -33 +30,28 @@
                -      format: [:html, :xml, :commonmark, :plaintext].freeze,
                +      extension: {
                +        strikethrough: true,
                +        tagfilter: true,
                +        table: true,
                +        autolink: true,
                +        tasklist: true,
                +        superscript: false,
                +        header_ids: "",
                +        footnotes: false,
                +        inline_footnotes: false,
                +        description_lists: false,
                +        front_matter_delimiter: "",
                +        multiline_block_quotes: false,
                +        math_dollars: false,
                +        math_code: false,
                +        shortcodes: true,
                +        wikilinks_title_before_pipe: false,
                +        wikilinks_title_after_pipe: false,
                +        underline: false,
                +        spoiler: false,
                +        greentext: false,
                +        subscript: false,
                +        subtext: false,
                +        alerts: false,
                +        cjk_friendly_emphasis: false,
                +        highlight: false,
                +      }.freeze,
                +      format: [:html].freeze,
                @@ -35,0 +60,7 @@
                +    PLUGINS = {
                +      syntax_highlighter: {
                +        theme: "base16-ocean.dark",
                +        path: "",
                +      },
                +    }
                +
                @@ -37,11 +68,31 @@
                -      def process_options(option, type)
                -        case option
                -        when Symbol
                -          OPTS.fetch(type).fetch(option)
                -        when Array
                -          raise TypeError if option.none?
                -
                -          # neckbearding around. the map will both check the opts and then bitwise-OR it
                -          OPTS.fetch(type).fetch_values(*option).inject(0, :|)
                -        else
                -          raise TypeError, "option type must be a valid symbol or array of symbols within the #{name}::OPTS[:#{type}] context"
                +      include Commonmarker::Utils
                +
                +      def process_options(options)
                +        {
                +          parse: process_parse_options(options[:parse].dup),
                +          render: process_render_options(options[:render].dup),
                +          extension: process_extension_options(options[:extension].dup),
                +        }
                +      end
                +
                +      def process_plugins(plugins)
                +        {
                +          syntax_highlighter: process_syntax_highlighter_plugin(plugins&.fetch(:syntax_highlighter, nil)),
                +        }
                +      end
                +    end
                +
                +    [:parse, :render, :extension].each do |type|
                +      define_singleton_method :"process_#{type}_options" do |options|
                +        Commonmarker::Config::OPTIONS[type].each_with_object({}) do |(key, value), hash|
                +          if options.nil? || !options.key?(key) # option not provided, use the default
                +            hash[key] = value
                +            next
                +          end
                +
                +          if options[key].nil? # # option explicitly not included, remove it
                +            options.delete(key)
                +            next
                +          end
                +
                +          hash[key] = fetch_kv(options, key, value, type)
                @@ -49,2 +99,0 @@
                -      rescue KeyError => e
                -        raise TypeError, "option ':#{e.key}' does not exist for #{name}::OPTS[:#{type}]"
                @@ -52 +101,10 @@
                -  end
                +    end
                +
                +    define_singleton_method :process_syntax_highlighter_plugin do |options|
                +      return if options.nil? # plugin explicitly nil, remove it
                +
                +      raise TypeError, "Expected a Hash for syntax_highlighter plugin, got #{options.class}" unless options.is_a?(Hash)
                +      raise TypeError, "Expected a Hash for syntax_highlighter plugin, got nothing" if options.empty?
                +
                +      Commonmarker::Config::PLUGINS[:syntax_highlighter].merge(options)
                +    end
        lib/commonmarker/node.rb
                --- /tmp/d20260126-549-jxj84d/commonmarker-0.23.10/lib/commonmarker/node.rb	2026-01-26 03:34:14.193048755 +0000
                +++ /tmp/d20260126-549-jxj84d/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/node.rb	2026-01-26 03:34:14.315049744 +0000
                @@ -2,0 +3 @@
                +require "commonmarker/node/ast"
                @@ -5 +6 @@
                -module CommonMarker
                +module Commonmarker
                @@ -22,10 +23,3 @@
                -    # Public: Convert the node to an HTML string.
                -    #
                -    # options - A {Symbol} or {Array of Symbol}s indicating the render options
                -    # extensions - An {Array of Symbol}s indicating the extensions to use
                -    #
                -    # Returns a {String}.
                -    def to_html(options = :DEFAULT, extensions = [])
                -      opts = Config.process_options(options, :render)
                -      _render_html(opts, extensions).force_encoding("utf-8")
                -    end
                +    # Public: Iterate over the children (if any) of the current pointer.
                +    def each
                +      return enum_for(:each) unless block_given?
                @@ -33,8 +27,6 @@
                -    # Public: Convert the node to an XML string.
                -    #
                -    # options - A {Symbol} or {Array of Symbol}s indicating the render options
                -    #
                -    # Returns a {String}.
                -    def to_xml(options = :DEFAULT)
                -      opts = Config.process_options(options, :render)
                -      _render_xml(opts).force_encoding("utf-8")
                +      child = first_child
                +      while child
                +        next_child = child.next_sibling
                +        yield child
                +        child = next_child
                +      end
                @@ -43 +35 @@
                -    # Public: Convert the node to a CommonMark string.
                +    # Public: Converts a node to an HTML string.
                @@ -45,2 +37,2 @@
                -    # options - A {Symbol} or {Array of Symbol}s indicating the render options
                -    # width - Column to wrap the output at
                +    # options - A {Hash} of render, parse, and extension options to transform the text.
                +    # plugins - A {Hash} of additional plugins.
                @@ -48,4 +40,8 @@
                -    # Returns a {String}.
                -    def to_commonmark(options = :DEFAULT, width = 120)
                -      opts = Config.process_options(options, :render)
                -      _render_commonmark(opts, width).force_encoding("utf-8")
                +    # Returns a {String} of HTML.
                +    def to_html(options: Commonmarker::Config::OPTIONS, plugins: Commonmarker::Config::PLUGINS)
                +      raise TypeError, "options must be a Hash; got a #{options.class}!" unless options.is_a?(Hash)
                +
                +      opts = Config.process_options(options)
                +      plugins = Config.process_plugins(plugins)
                +
                +      node_to_html(render: opts[:render], parse: opts[:parse], extension: opts[:extension], plugins: plugins).force_encoding("utf-8")
                @@ -54 +50 @@
                -    # Public: Convert the node to a plain text string.
                +    # Public: Convert the node to a CommonMark string.
                @@ -57 +53 @@
                -    # width - Column to wrap the output at
                +    # plugins - A {Hash} of additional plugins.
                @@ -60,8 +56,2 @@
                -    def to_plaintext(options = :DEFAULT, width = 120)
                -      opts = Config.process_options(options, :render)
                -      _render_plaintext(opts, width).force_encoding("utf-8")
                -    end
                -
                -    # Public: Iterate over the children (if any) of the current pointer.
                -    def each
                -      return enum_for(:each) unless block_given?
                +    def to_commonmark(options: Commonmarker::Config::OPTIONS, plugins: Commonmarker::Config::PLUGINS)
                +      raise TypeError, "options must be a Hash; got a #{options.class}!" unless options.is_a?(Hash)
                @@ -69,7 +59,2 @@
                -      child = first_child
                -      while child
                -        nextchild = child.next
                -        yield child
                -        child = nextchild
                -      end
                -    end
                +      opts = Config.process_options(options)
                +      plugins = Config.process_plugins(plugins)
                @@ -77,4 +62 @@
                -    # Deprecated: Please use `each` instead
                -    def each_child(&block)
                -      warn("[DEPRECATION] `each_child` is deprecated.  Please use `each` instead.")
                -      each(&block)
                +      node_to_commonmark(render: opts[:render], parse: opts[:parse], extension: opts[:extension], plugins: plugins).force_encoding("utf-8")
        lib/commonmarker/node/inspect.rb
                --- /tmp/d20260126-549-jxj84d/commonmarker-0.23.10/lib/commonmarker/node/inspect.rb	2026-01-26 03:34:14.199048803 +0000
                +++ /tmp/d20260126-549-jxj84d/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/node/inspect.rb	2026-01-26 03:34:14.315049744 +0000
                @@ -5 +5 @@
                -module CommonMarker
                +module Commonmarker
                @@ -19 +19,11 @@
                -          attrs = [:sourcepos, :string_content, :url, :title, :header_level, :list_type, :list_start, :list_tight, :fence_info].map do |name|
                +          attrs = [
                +            :source_position,
                +            :string_content,
                +            :url,
                +            :title,
                +            :header_level,
                +            :list_type,
                +            :list_start,
                +            :list_tight,
                +            :fence_info,
                +          ].filter_map do |name|
                @@ -21 +31 @@
                -          rescue NodeError
                +          rescue StandardError
                @@ -37 +47 @@
                -                node = node.next
                +                node = node.next_sibling
        lib/commonmarker/renderer.rb
                --- /tmp/d20260126-549-jxj84d/commonmarker-0.23.10/lib/commonmarker/renderer.rb	2026-01-26 03:34:14.199048803 +0000
                +++ /tmp/d20260126-549-jxj84d/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/renderer.rb	2026-01-26 03:34:14.315049744 +0000
                @@ -6 +6 @@
                -module CommonMarker
                +module Commonmarker
                @@ -8,126 +7,0 @@
                -    attr_accessor :in_tight, :warnings, :in_plain
                -
                -    def initialize(options: :DEFAULT, extensions: [])
                -      @opts = Config.process_options(options, :render)
                -      @stream = StringIO.new(+"")
                -      @need_blocksep = false
                -      @warnings = Set.new([])
                -      @in_tight = false
                -      @in_plain = false
                -      @tagfilter = extensions.include?(:tagfilter)
                -    end
                -
                -    def out(*args)
                -      args.each do |arg|
                -        case arg
                -        when :children
                -          @node.each { |child| out(child) }
                -        when Array
                -          arg.each { |x| render(x) }
                -        when Node
                -          render(arg)
                -        else
                -          @stream.write(arg)
                -        end
                -      end
                -    end
                -
                -    def render(node)
                -      @node = node
                -      if node.type == :document
                -        document(node)
                -        @stream.string
                -      elsif @in_plain && node.type != :text && node.type != :softbreak
                -        node.each { |child| render(child) }
                -      else
                -        begin
                -          send(node.type, node)
                -        rescue NoMethodError => e
                -          @warnings.add("WARNING: #{node.type} not implemented.")
                -          raise e
                -        end
                -      end
                -    end
                -
                -    def document(_node)
                -      out(:children)
                -    end
                -
                -    def code_block(node)
                -      code_block(node)
                -    end
                -
                -    def reference_def(_node); end
                -
                -    def cr
                -      return if @stream.string.empty? || @stream.string[-1] == "\n"
                -
                -      out("\n")
                -    end
                -
                -    def blocksep
                -      out("\n")
                -    end
                -
                -    def containersep
                -      cr unless @in_tight
                -    end
                -
                -    def block
                -      cr
                -      yield
                -      cr
                -    end
                -
                -    def container(starter, ender)
                -      out(starter)
                -      yield
                -      out(ender)
                -    end
                -
                -    def plain
                -      old_in_plain = @in_plain
                -      @in_plain = true
                -      yield
                -      @in_plain = old_in_plain
                -    end
                -
                -    private
                -
                -    def escape_href(str)
                -      @node.html_escape_href(str)
                -    end
                -
                -    def escape_html(str)
                -      @node.html_escape_html(str)
                -    end
                -
                -    def tagfilter(str)
                -      if @tagfilter
                -        str.gsub(
                -          %r{
                -            <
                -            (
                -            title|textarea|style|xmp|iframe|
                -            noembed|noframes|script|plaintext
                -            )
                -            (?=\s|>|/>)
                -          }xi,
                -          '&lt;\1',
                -        )
                -      else
                -        str
                -      end
                -    end
                -
                -    def sourcepos(node)
                -      return "" unless option_enabled?(:SOURCEPOS)
                -
                -      s = node.sourcepos
                -      " data-sourcepos=\"#{s[:start_line]}:#{s[:start_column]}-" \
                -        "#{s[:end_line]}:#{s[:end_column]}\""
                -    end
                -
                -    def option_enabled?(opt)
                -      (@opts & CommonMarker::Config::OPTS.dig(:render, opt)) != 0
                -    end
        lib/commonmarker/version.rb
                --- /tmp/d20260126-549-jxj84d/commonmarker-0.23.10/lib/commonmarker/version.rb	2026-01-26 03:34:14.199048803 +0000
                +++ /tmp/d20260126-549-jxj84d/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/version.rb	2026-01-26 03:34:14.316049752 +0000
                @@ -3,2 +3,2 @@
                -module CommonMarker
                -  VERSION = "0.23.10"
                +module Commonmarker
                +  VERSION = "2.6.3"

@github-actions
Copy link
Contributor

gem compare --diff commonmarker 0.23.10 2.6.3

Compared versions: ["0.23.10", "2.6.3"]
  DIFFERENT files:
    0.23.10->2.6.3:
      * Deleted:
            Rakefile
            bin/commonmarker
            commonmarker.gemspec
            ext/commonmarker/arena.c
            ext/commonmarker/autolink.c
            ext/commonmarker/autolink.h
            ext/commonmarker/blocks.c
            ext/commonmarker/buffer.c
            ext/commonmarker/buffer.h
            ext/commonmarker/case_fold_switch.inc
            ext/commonmarker/chunk.h
            ext/commonmarker/cmark-gfm-core-extensions.h
            ext/commonmarker/cmark-gfm-extension_api.h
            ext/commonmarker/cmark-gfm-extensions_export.h
            ext/commonmarker/cmark-gfm.h
            ext/commonmarker/cmark-gfm_export.h
            ext/commonmarker/cmark-gfm_version.h
            ext/commonmarker/cmark.c
            ext/commonmarker/cmark_ctype.c
            ext/commonmarker/cmark_ctype.h
            ext/commonmarker/commonmark.c
            ext/commonmarker/commonmarker.c
            ext/commonmarker/commonmarker.h
            ext/commonmarker/config.h
            ext/commonmarker/core-extensions.c
            ext/commonmarker/entities.inc
            ext/commonmarker/ext_scanners.c
            ext/commonmarker/ext_scanners.h
            ext/commonmarker/extconf.rb
            ext/commonmarker/footnotes.c
            ext/commonmarker/footnotes.h
            ext/commonmarker/houdini.h
            ext/commonmarker/houdini_href_e.c
            ext/commonmarker/houdini_html_e.c
            ext/commonmarker/houdini_html_u.c
            ext/commonmarker/html.c
            ext/commonmarker/html.h
            ext/commonmarker/inlines.c
            ext/commonmarker/inlines.h
            ext/commonmarker/iterator.c
            ext/commonmarker/iterator.h
            ext/commonmarker/latex.c
            ext/commonmarker/linked_list.c
            ext/commonmarker/man.c
            ext/commonmarker/map.c
            ext/commonmarker/map.h
            ext/commonmarker/node.c
            ext/commonmarker/node.h
            ext/commonmarker/parser.h
            ext/commonmarker/plaintext.c
            ext/commonmarker/plugin.c
            ext/commonmarker/plugin.h
            ext/commonmarker/references.c
            ext/commonmarker/references.h
            ext/commonmarker/registry.c
            ext/commonmarker/registry.h
            ext/commonmarker/render.c
            ext/commonmarker/render.h
            ext/commonmarker/scanners.c
            ext/commonmarker/scanners.h
            ext/commonmarker/scanners.re
            ext/commonmarker/strikethrough.c
            ext/commonmarker/strikethrough.h
            ext/commonmarker/syntax_extension.c
            ext/commonmarker/syntax_extension.h
            ext/commonmarker/table.c
            ext/commonmarker/table.h
            ext/commonmarker/tagfilter.c
            ext/commonmarker/tagfilter.h
            ext/commonmarker/tasklist.c
            ext/commonmarker/tasklist.h
            ext/commonmarker/utf8.c
            ext/commonmarker/utf8.h
            ext/commonmarker/xml.c
            lib/commonmarker/renderer/html_renderer.rb
      * Added:
              (!) Unexpected permissions: 100755
              (!) File is executable
              (!) Unexpected permissions: 100755
              (!) File is executable
              (!) Unexpected permissions: 100755
              (!) File is executable
              (!) Unexpected permissions: 100755
              (!) File is executable
        lib/commonmarker/3.2/commonmarker.so
                Binary files /tmp/20260126-375-q358bv and /tmp/d20260126-375-n4aq82/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/3.2/commonmarker.so differ
        lib/commonmarker/3.3/commonmarker.so
                Binary files /tmp/20260126-375-d0sr25 and /tmp/d20260126-375-n4aq82/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/3.3/commonmarker.so differ
        lib/commonmarker/3.4/commonmarker.so
                Binary files /tmp/20260126-375-hh7a17 and /tmp/d20260126-375-n4aq82/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/3.4/commonmarker.so differ
        lib/commonmarker/4.0/commonmarker.so
                Binary files /tmp/20260126-375-1le6en and /tmp/d20260126-375-n4aq82/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/4.0/commonmarker.so differ
        lib/commonmarker/constants.rb
                --- /tmp/20260126-375-vef9wo	2026-01-26 03:34:14.589670961 +0000
                +++ /tmp/d20260126-375-n4aq82/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/constants.rb	2026-01-26 03:34:14.579670940 +0000
                @@ -0,0 +1,7 @@
                +# frozen_string_literal: true
                +
                +module Commonmarker
                +  module Constants
                +    BOOLS = [true, false].freeze
                +  end
                +end
        lib/commonmarker/extension.rb
                --- /tmp/20260126-375-47u82m	2026-01-26 03:34:14.704671203 +0000
                +++ /tmp/d20260126-375-n4aq82/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/extension.rb	2026-01-26 03:34:14.579670940 +0000
                @@ -0,0 +1,14 @@
                +# frozen_string_literal: true
                +
                +begin
                +  # native precompiled gems package shared libraries in <gem_dir>/lib/commonmarker/<ruby_version>
                +  # load the precompiled extension file
                +  ruby_version = /\d+\.\d+/.match(RUBY_VERSION)
                +  require_relative "#{ruby_version}/commonmarker"
                +rescue LoadError
                +  # fall back to the extension compiled upon installation.
                +  # use "require" instead of "require_relative" because non-native gems will place C extension files
                +  # in Gem::BasicSpecification#extension_dir after compilation (during normal installation), which
                +  # is in $LOAD_PATH but not necessarily relative to this file (see nokogiri#2300)
                +  require "commonmarker/commonmarker"
                +end
        lib/commonmarker/node/ast.rb
                --- /tmp/20260126-375-qv2uke	2026-01-26 03:34:14.705671205 +0000
                +++ /tmp/d20260126-375-n4aq82/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/node/ast.rb	2026-01-26 03:34:14.580670943 +0000
                @@ -0,0 +1,8 @@
                +# frozen_string_literal: true
                +
                +module Commonmarker
                +  class Node
                +    class Ast
                +    end
                +  end
                +end
        lib/commonmarker/utils.rb
                --- /tmp/20260126-375-luvn6z	2026-01-26 03:34:14.706671207 +0000
                +++ /tmp/d20260126-375-n4aq82/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/utils.rb	2026-01-26 03:34:14.580670943 +0000
                @@ -0,0 +1,22 @@
                +# frozen_string_literal: true
                +
                +require "commonmarker/constants"
                +
                +module Commonmarker
                +  module Utils
                +    include Commonmarker::Constants
                +
                +    def fetch_kv(options, key, value, type)
                +      value_klass = value.class
                +
                +      if Constants::BOOLS.include?(value) && BOOLS.include?(options[key])
                +        options[key]
                +      elsif options[key].is_a?(value_klass)
                +        options[key]
                +      else
                +        expected_type = Constants::BOOLS.include?(value) ? "Boolean" : value_klass.to_s
                +        raise TypeError, "#{type} option `:#{key}` must be #{expected_type}; got #{options[key].class}"
                +      end
                +    end
                +  end
                +end
      * Changed:
              (!) Shebang probably lost: #!/usr/bin/env ruby
        README.md
                --- /tmp/d20260126-375-n4aq82/commonmarker-0.23.10/README.md	2026-01-26 03:34:14.345670449 +0000
                +++ /tmp/d20260126-375-n4aq82/commonmarker-2.6.3-x86_64-linux/README.md	2026-01-26 03:34:14.446670661 +0000
                @@ -1 +1 @@
                -# CommonMarker
                +# Commonmarker
                @@ -3 +3 @@
                -![Build Status](https://github.com/gjtorikian/commonmarker/workflows/CI/badge.svg) [![Gem Version](https://badge.fury.io/rb/commonmarker.svg)](http://badge.fury.io/rb/commonmarker)
                +Ruby wrapper for Rust's [comrak](https://github.com/kivikakk/comrak) crate.
                @@ -5,2 +5 @@
                -Ruby wrapper for [libcmark-gfm](https://github.com/github/cmark),
                -GitHub's fork of the reference parser for CommonMark. It passes all of the C tests, 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.
                +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.
                @@ -8 +7,4 @@
                -For more information on available extensions, see [the documentation below](#extensions).
                +> [!NOTE]
                +> By default, several extensions not in any spec have been enabled, for the sake of end user convenience when generating HTML.
                +>
                +> For more information on the available options and extensions, see [the documentation below](#options-and-plugins).
                @@ -25,0 +28,2 @@
                +This gem expects to receive UTF-8 strings. Ensure your strings are the right encoding before passing them into `Commonmarker`.
                +
                @@ -28 +32 @@
                -Call `render_html` on a string to convert it to HTML:
                +Call `to_html` on a string to convert it to HTML:
                @@ -30 +34 @@
                -``` ruby
                +```ruby
                @@ -32,2 +36,4 @@
                -CommonMarker.render_html('Hi *there*', :DEFAULT)
                -# <p>Hi <em>there</em></p>\n
                +Commonmarker.to_html('"Hi *there*"', options: {
                +    parse: { smart: true }
                +})
                +# => <p>“Hi <em>there</em>”</p>\n
                @@ -36 +42 @@
                -The second argument is optional--[see below](#options) for more information.
                +(The second argument is optional--[see below](#options-and-plugins) for more information.)
                @@ -40 +46 @@
                -You can also parse a string to receive a `Document` node. You can then print that node to HTML, iterate over the children, and other fun node stuff. For example:
                +You can also parse a string to receive a `:document` node. You can then print that node to HTML, iterate over the children, and do other fun node stuff. For example:
                @@ -42 +48 @@
                -``` ruby
                +```ruby
                @@ -45,2 +51,4 @@
                -doc = CommonMarker.render_doc('*Hello* world', :DEFAULT)
                -puts(doc.to_html) # <p>Hi <em>there</em></p>\n
                +doc = Commonmarker.parse("*Hello* world", options: {
                +    parse: { smart: true }
                +})
                +puts(doc.to_html) # => <p><em>Hello</em> world</p>\n
                @@ -49 +57 @@
                -  puts node.type # [:document, :paragraph, :text, :emph, :text]
                +  puts node.type # => [:document, :paragraph, :emph, :text, :text]
                @@ -53 +61,27 @@
                -The second argument is optional--[see below](#options) for more information.
                +(The second argument is optional--[see below](#options-and-plugins) for more information.)
                +
                +When it comes to modifying the document, you can perform the following operations:
                +
                +- `insert_before`
                +- `insert_after`
                +- `prepend_child`
                +- `append_child`
                +- `delete`
                +
                +You can also get the source position of a node by calling `source_position`:
                +
                +```ruby
                +doc = Commonmarker.parse("*Hello* world")
                +puts doc.first_child.first_child.source_position
                +# => {:start_line=>1, :start_column=>1, :end_line=>1, :end_column=>7}
                +```
                +
                +You can also modify the following attributes:
                +
                +- `url`
                +- `title`
                +- `header_level`
                +- `list_type`
                +- `list_start`
                +- `list_tight`
                +- `fence_info`
                @@ -55 +89 @@
                -#### Example: walking the AST
                +#### Example: Walking the AST
                @@ -60 +94 @@
                -- `each` will iterate on a node and its children, but no further.
                +- `each` will iterate on a node's direct children, but no further.
                @@ -62 +96 @@
                -``` ruby
                +```ruby
                @@ -65,2 +99,2 @@
                -# parse the files specified on the command line
                -doc = CommonMarker.render_doc("# The site\n\n [GitHub](https://www.github.com)")
                +# parse some string
                +doc = Commonmarker.parse("# The site\n\n [GitHub](https://www.github.com)")
                @@ -74,11 +108 @@
                -
                -# Capitalize all regular text in headers
                -doc.walk do |node|
                -  if node.type == :header
                -    node.each do |subnode|
                -      if subnode.type == :text
                -        subnode.string_content = subnode.string_content.upcase
                -      end
                -    end
                -  end
                -end
                +# => URL = https://www.github.com
                @@ -92,0 +117 @@
                +# => <h1><a href=\"#the-site\"></a>The site</h1>\n<p>GitHub</p>\n
                @@ -95 +120 @@
                -### Creating a custom renderer
                +#### Example: Converting a document back into raw CommonMark
                @@ -97 +122 @@
                -You can also derive a class from CommonMarker's `HtmlRenderer` class. This produces slower output, but is far more customizable. For example:
                +You can use `to_commonmark` on a node to render it as raw text:
                @@ -99,6 +124,2 @@
                -``` ruby
                -class MyHtmlRenderer < CommonMarker::HtmlRenderer
                -  def initialize
                -    super
                -    @headerid = 1
                -  end
                +```ruby
                +require 'commonmarker'
                @@ -106,6 +127,8 @@
                -  def header(node)
                -    block do
                -      out("<h", node.header_level, " id=\"", @headerid, "\">",
                -               :children, "</h", node.header_level, ">")
                -      @headerid += 1
                -    end
                +# parse some string
                +doc = Commonmarker.parse("# The site\n\n [GitHub](https://www.github.com)")
                +
                +# Transform links to regular text
                +doc.walk do |node|
                +  if node.type == :link
                +    node.insert_before(node.first_child)
                +    node.delete
                @@ -115,7 +138,2 @@
                -myrenderer = MyHtmlRenderer.new
                -puts myrenderer.render(doc)
                -
                -# Print any warnings to STDERR
                -renderer.warnings.each do |w|
                -  STDERR.write("#{w}\n")
                -end
                +doc.to_commonmark
                +# => # The site\n\nGitHub\n
                @@ -124,16 +142 @@
                -## Options
                -
                -CommonMarker accepts the same options that CMark does, as symbols. Note that there is a distinction in CMark for "parse" options and "render" options, which are represented in the tables below.
                -
                -### Parse options
                -
                -| Name                          | Description
                -| ----------------------------- | -----------
                -| `:DEFAULT`                    | The default parsing system.
                -| `:SOURCEPOS`                  | Include source position in nodes
                -| `:UNSAFE`                     | Allow raw/custom HTML and unsafe links.
                -| `:VALIDATE_UTF8`              | Replace illegal sequences with the replacement character `U+FFFD`.
                -| `:SMART`                      | Use smart punctuation (curly quotes, etc.).
                -| `:LIBERAL_HTML_TAG`           | Support liberal parsing of inline HTML tags.
                -| `:FOOTNOTES`                  | Parse footnotes.
                -| `:STRIKETHROUGH_DOUBLE_TILDE` | Parse strikethroughs by double tildes (compatibility with [redcarpet](https://github.com/vmg/redcarpet))
                +## Options and plugins
                @@ -141,17 +144 @@
                -### Render options
                -
                -| Name                             | Description                                                     |
                -| ------------------               | -----------                                                     |
                -| `:DEFAULT`                       | The default rendering system.                                   |
                -| `:SOURCEPOS`                     | Include source position in rendered HTML.                       |
                -| `:HARDBREAKS`                    | Treat `\n` as hardbreaks (by adding `<br/>`).                   |
                -| `:UNSAFE`                        | Allow raw/custom HTML and unsafe links.                         |
                -| `:NOBREAKS`                      | Translate `\n` in the source to a single whitespace.            |
                -| `:VALIDATE_UTF8`                 | Replace illegal sequences with the replacement character `U+FFFD`. |
                -| `:SMART`                         | Use smart punctuation (curly quotes, etc.).                     |
                -| `:GITHUB_PRE_LANG`               | Use GitHub-style `<pre lang>` for fenced code blocks.           |
                -| `:LIBERAL_HTML_TAG`              | Support liberal parsing of inline HTML tags.                    |
                -| `:FOOTNOTES`                     | Render footnotes.                                               |
                -| `:STRIKETHROUGH_DOUBLE_TILDE`    | Parse strikethroughs by double tildes (compatibility with [redcarpet](https://github.com/vmg/redcarpet)) |
                -| `:TABLE_PREFER_STYLE_ATTRIBUTES` | Use `style` insted of `align` for table cells.                  |
                -| `:FULL_INFO_STRING`              | Include full info strings of code blocks in separate attribute. |
                +### Options
                @@ -159 +146 @@
                -### Passing options
                +Commonmarker accepts the same parse, render, and extensions options that comrak does, as a hash dictionary with symbol keys:
                @@ -161,11 +148,5 @@
                -To apply a single option, pass it in as a symbol argument:
                -
                -``` ruby
                -CommonMarker.render_doc("\"Hello,\" said the spider.", :SMART)
                -# <p>“Hello,” said the spider.</p>\n
                -```
                -
                -To have multiple options applied, pass in an array of symbols:
                -
                -``` ruby
                -CommonMarker.render_html("\"'Shelob' is my name.\"", [:HARDBREAKS, :SOURCEPOS])
                +```ruby
                +Commonmarker.to_html('"Hi *there*"', options:{
                +  parse: { smart: true },
                +  render: { hardbreaks: false}
                +})
                @@ -174 +155 @@
                -For more information on these options, see [the CMark documentation](https://git.io/v7nh1).
                +Note that there is a distinction in comrak for "parse" options and "render" options, which are represented in the tables below. As well, if you wish to disable any-non boolean option, pass in `nil`.
                @@ -176,5 +157 @@
                -## Extensions
                -
                -Both `render_html` and `render_doc` take an optional third argument defining the extensions you want enabled as your CommonMark document is being processed. The documentation for these extensions are [defined in this spec](https://github.github.com/gfm/), and the rationale is provided [in this blog post](https://githubengineering.com/a-formal-spec-for-github-markdown/).
                -
                -The available extensions are:
                +### Parse options
                @@ -182,5 +159,8 @@
                -* `:table` - This provides support for tables.
                -* `:tasklist` - This provides support for task list items.
                -* `:strikethrough` - This provides support for strikethroughs.
                -* `:autolink` - This provides support for automatically converting URLs to anchor tags.
                -* `:tagfilter` - This escapes [several "unsafe" HTML tags](https://github.github.com/gfm/#disallowed-raw-html-extension-), causing them to not have any effect.
                +| Name                         | Description                                                                                                                                 | Default |
                +| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
                +| `smart`                      | Punctuation (quotes, full-stops and hyphens) are converted into 'smart' punctuation.                                                        | `false` |
                +| `default_info_string`        | The default info string for fenced code blocks.                                                                                             | `""`    |
                +| `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` |
                +| `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` |
                +| `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` |
                +| `ignore_setext`              | Ignores setext-style headings.                                                                                                              | `false` |
                @@ -188,3 +168 @@
                -## Output formats
                -
                -Like CMark, CommonMarker can generate output in several formats: HTML, XML, plaintext, and commonmark are currently supported.
                +### Render options
                @@ -192 +170,14 @@
                -### HTML
                +| Name                 | Description                                                                                            | Default |
                +| -------------------- | ------------------------------------------------------------------------------------------------------ | ------- |
                +| `hardbreaks`         | [Soft line breaks](http://spec.commonmark.org/0.27/#soft-line-breaks) translate into hard line breaks. | `true`  |
                +| `github_pre_lang`    | GitHub-style `<pre lang="xyz">` is used for fenced code blocks with info tags.                         | `true`  |
                +| `full_info_string`   | Gives info string data after a space in a `data-meta` attribute on code blocks.                        | `false` |
                +| `width`              | The wrap column when outputting CommonMark.                                                            | `80`    |
                +| `unsafe`             | Allow rendering of raw HTML and potentially dangerous links.                                           | `false` |
                +| `escape`             | Escape raw HTML instead of clobbering it.                                                              | `false` |
                +| `sourcepos`          | Include source position attribute in HTML and XML output.                                              | `false` |
                +| `escaped_char_spans` | Wrap escaped characters in span tags.                                                                  | `true`  |
                +| `ignore_empty_links` | Ignores empty links, leaving the Markdown text in place.                                               | `false` |
                +| `gfm_quirks`         | Outputs HTML with GFM-style quirks; namely, not nesting `<strong>` inlines.                            | `false` |
                +| `prefer_fenced`      | Always output fenced code blocks, even where an indented one could be used.                            | `false` |
                +| `tasklist_classes`   | Add CSS classes to the HTML output of the tasklist extension                                           | `false` |
                @@ -194 +185 @@
                -The default output format, HTML, will be generated when calling `to_html` or using `--to=html` on the command line.
                +As well, there are several extensions which you can toggle in the same manner:
                @@ -197,2 +188,62 @@
                -doc = CommonMarker.render_doc('*Hello* world!', :DEFAULT)
                -puts(doc.to_html)
                +Commonmarker.to_html('"Hi *there*"', options: {
                +    extension: { footnotes: true, description_lists: true },
                +    render: { hardbreaks: false }
                +})
                +```
                +
                +### Extension options
                +
                +| Name                          | Description                                                                                                         | Default |
                +| ----------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------- |
                +| `strikethrough`               | Enables the [strikethrough extension](https://github.github.com/gfm/#strikethrough-extension-) from the GFM spec.   | `true`  |
                +| `tagfilter`                   | Enables the [tagfilter extension](https://github.github.com/gfm/#disallowed-raw-html-extension-) from the GFM spec. | `true`  |
                +| `table`                       | Enables the [table extension](https://github.github.com/gfm/#tables-extension-) from the GFM spec.                  | `true`  |
                +| `autolink`                    | Enables the [autolink extension](https://github.github.com/gfm/#autolinks-extension-) from the GFM spec.            | `true`  |
                +| `tasklist`                    | Enables the [task list extension](https://github.github.com/gfm/#task-list-items-extension-) from the GFM spec.     | `true`  |
                +| `superscript`                 | Enables the superscript Comrak extension.                                                                           | `false` |
                +| `header_ids`                  | Enables the header IDs Comrak extension. from the GFM spec.                                                         | `""`    |
                +| `footnotes`                   | Enables the footnotes extension per `cmark-gfm`.                                                                    | `false` |
                +| `inline_footnotes`            | Enables the inline footnotes extension.                                                                             | `false` |
                +| `description_lists`           | Enables the description lists extension.                                                                            | `false` |
                +| `front_matter_delimiter`      | Enables the front matter extension.                                                                                 | `""`    |
                +| `multiline_block_quotes`      | Enables the multiline block quotes extension.                                                                       | `false` |
                +| `math_dollars`, `math_code`   | Enables the math extension.                                                                                         | `false` |
                +| `shortcodes`                  | Enables the shortcodes extension.                                                                                   | `true`  |
                +| `wikilinks_title_before_pipe` | Enables the wikilinks extension, placing the title before the dividing pipe.                                        | `false` |
                +| `wikilinks_title_after_pipe`  | Enables the wikilinks extension, placing the title after the dividing pipe.                                         | `false` |
                +| `underline`                   | Enables the underline extension.                                                                                    | `false` |
                +| `spoiler`                     | Enables the spoiler extension.                                                                                      | `false` |
                +| `greentext`                   | Enables the greentext extension.                                                                                    | `false` |
                +| `subtext`                     | Enables the subtext extension.                                                                                      | `false` |
                +| `subscript`                   | Enables the subscript extension.                                                                                    | `false` |
                +| `alerts`                      | Enables the alerts extension.                                                                                       | `false` |
                +| `cjk_friendly_emphasis`       | Enables the [CJK friendly emphasis](https://github.com/tats-u/markdown-cjk-friendly) extension.                     | `false` |
                +| `highlight`                   | Enables highlighting via `==`                                                                                       | `false` |
                +
                +For more information on these options, see [the comrak documentation](https://github.com/kivikakk/comrak#usage).
                +
                +### Plugins
                +
                +In addition to the possibilities provided by generic CommonMark rendering, Commonmarker also supports plugins as a means of
                +providing further niceties.
                +
                +#### Syntax Highlighter Plugin
                +
                +The library comes with [a set of pre-existing themes](https://docs.rs/syntect/5.0.0/syntect/highlighting/struct.ThemeSet.html#implementations) for highlighting code:
                +
                +- `"base16-ocean.dark"`
                +- `"base16-eighties.dark"`
                +- `"base16-mocha.dark"`
                +- `"base16-ocean.light"`
                +- `"InspiredGitHub"`
                +- `"Solarized (dark)"`
                +- `"Solarized (light)"`
                +
                +````ruby
                +code = <<~CODE
                +  ```ruby
                +  def hello
                +    puts "hello"
                +  end
                +  ```
                +CODE
                @@ -200,2 +251,2 @@
                -<p><em>Hello</em> world!</p>
                -```
                +# pass in a theme name from a pre-existing set
                +puts Commonmarker.to_html(code, plugins: { syntax_highlighter: { theme: "InspiredGitHub" } })
                @@ -203 +254,20 @@
                -### XML
                +# <pre style="background-color:#ffffff;" lang="ruby"><code>
                +# <span style="font-weight:bold;color:#a71d5d;">def </span><span style="font-weight:bold;color:#795da3;">hello
                +# </span><span style="color:#62a35c;">puts </span><span style="color:#183691;">&quot;hello&quot;
                +# </span><span style="font-weight:bold;color:#a71d5d;">end
                +# </span>
                +# </code></pre>
                +````
                +
                +By default, the plugin uses the `"base16-ocean.dark"` theme to syntax highlight code.
                +
                +To disable this plugin, set the value to `nil`:
                +
                +````ruby
                +code = <<~CODE
                +  ```ruby
                +  def hello
                +    puts "hello"
                +  end
                +  ```
                +CODE
                @@ -205 +275 @@
                -XML will be generated when calling `to_xml` or using `--to=xml` on the command line.
                +Commonmarker.to_html(code, plugins: { syntax_highlighter: nil })
                @@ -207,3 +277,15 @@
                -```ruby
                -doc = CommonMarker.render_doc('*Hello* world!', :DEFAULT)
                -puts(doc.to_xml)
                +# <pre lang="ruby"><code>def hello
                +#   puts &quot;hello&quot;
                +# end
                +# </code></pre>
                +````
                +
                +To output CSS classes instead of `style` attributes, set the `theme` key to `""`:
                +
                +````ruby
                +code = <<~CODE
                +  ```ruby
                +  def hello
                +    puts "hello"
                +  end
                +CODE
                @@ -211,11 +293 @@
                -<?xml version="1.0" encoding="UTF-8"?>
                -<!DOCTYPE document SYSTEM "CommonMark.dtd">
                -<document xmlns="http://commonmark.org/xml/1.0">
                -  <paragraph>
                -    <emph>
                -      <text xml:space="preserve">Hello</text>
                -    </emph>
                -    <text xml:space="preserve"> world!</text>
                -  </paragraph>
                -</document>
                -```
                +Commonmarker.to_html(code, plugins: { syntax_highlighter: { theme: "" } })
                @@ -223 +295,4 @@
                -### Plaintext
                +# <pre class="syntax-highlighting"><code><span class="source ruby"><span class="meta function ruby"><span class="keyword control def ruby">def</span></span><span class="meta function ruby"> # <span class="entity name function ruby">hello</span></span>
                +#   <span class="support function builtin ruby">puts</span> <span class="string quoted double ruby"><span class="punctuation definition string begin ruby">&quot;</span>hello<span class="punctuation definition string end ruby">&quot;</span></span>
                +# <span class="keyword control ruby">end</span>\n</span></code></pre>
                +````
                @@ -225 +300 @@
                -Plaintext will be generated when calling `to_plaintext` or using `--to=plaintext` on the command line.
                +To use a custom theme, you can provide a `path` to a directory containing `.tmtheme` files to load:
                @@ -228,4 +303 @@
                -doc = CommonMarker.render_doc('*Hello* world!', :DEFAULT)
                -puts(doc.to_plaintext)
                -
                -Hello world!
                +Commonmarker.to_html(code, plugins: { syntax_highlighter: { theme: "Monokai", path: "./themes" } })
                @@ -234,11 +306 @@
                -### Commonmark
                -
                -Commonmark will be generated when calling `to_commonmark` or using `--to=commonmark` on the command line.
                -
                -``` ruby
                -text = <<-TEXT
                -1. I am a numeric list.
                -2. I continue the list.
                -* Suddenly, an unordered list!
                -* What fun!
                -TEXT
                +## Output formats
                @@ -246,2 +308 @@
                -doc = CommonMarker.render_doc(text, :DEFAULT)
                -puts(doc.to_commonmark)
                +Commonmarker can currently only generate output in one format: HTML.
                @@ -249,2 +310 @@
                -1.  I am a numeric list.
                -2.  I continue the list.
                +### HTML
                @@ -252 +312,2 @@
                -<!-- end list -->
                +```ruby
                +puts Commonmarker.to_html('*Hello* world!')
                @@ -254,2 +315 @@
                -  - Suddenly, an unordered list\!
                -  - What fun\!
                +# <p><em>Hello</em> world!</p>
                @@ -267 +327 @@
                -If there were no errors, you're done! Otherwise, make sure to follow the CMark dependency instructions.
                +If there were no errors, you're done! Otherwise, make sure to follow the comrak dependency instructions.
                @@ -271,2 +330,0 @@
                -Some rough benchmarks:
                -
                @@ -274,3 +332,2 @@
                -$ bundle exec rake benchmark
                -
                -input size = 11063727 bytes
                +❯ bundle exec rake benchmark
                +input size = 11064832 bytes
                @@ -278,10 +335,24 @@
                -redcarpet
                -  0.070000   0.020000   0.090000 (  0.079641)
                -github-markdown
                -  0.070000   0.010000   0.080000 (  0.083535)
                -commonmarker with to_html
                -  0.100000   0.010000   0.110000 (  0.111947)
                -commonmarker with ruby HtmlRenderer
                -  1.830000   0.030000   1.860000 (  1.866203)
                -kramdown
                -  4.610000   0.070000   4.680000 (  4.678398)
                +ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
                +Warming up --------------------------------------
                +  Markly.render_html     1.000 i/100ms
                +Markly::Node#to_html     1.000 i/100ms
                +Commonmarker.to_html     1.000 i/100ms
                +Commonmarker::Node.to_html
                +                         1.000 i/100ms
                +Kramdown::Document#to_html
                +                         1.000 i/100ms
                +Calculating -------------------------------------
                +  Markly.render_html     15.606 (±25.6%) i/s -     71.000 in   5.047132s
                +Markly::Node#to_html     15.692 (±25.5%) i/s -     72.000 in   5.095810s
                +Commonmarker.to_html      4.482 (± 0.0%) i/s -     23.000 in   5.137680s
                +Commonmarker::Node.to_html
                +                          5.092 (±19.6%) i/s -     25.000 in   5.072220s
                +Kramdown::Document#to_html
                +                          0.379 (± 0.0%) i/s -      2.000 in   5.277770s
                +
                +Comparison:
                +Markly::Node#to_html:       15.7 i/s
                +  Markly.render_html:       15.6 i/s - same-ish: difference falls within error
                +Commonmarker::Node.to_html:        5.1 i/s - 3.08x  slower
                +Commonmarker.to_html:        4.5 i/s - 3.50x  slower
                +Kramdown::Document#to_html:        0.4 i/s - 41.40x  slower
        lib/commonmarker.rb
                --- /tmp/d20260126-375-n4aq82/commonmarker-0.23.10/lib/commonmarker.rb	2026-01-26 03:34:14.422670610 +0000
                +++ /tmp/d20260126-375-n4aq82/commonmarker-2.6.3-x86_64-linux/lib/commonmarker.rb	2026-01-26 03:34:14.447670663 +0000
                @@ -1 +0,0 @@
                -#!/usr/bin/env ruby
                @@ -4,2 +3,3 @@
                -require "commonmarker/commonmarker"
                -require "commonmarker/config"
                +require_relative "commonmarker/extension"
                +
                +require "commonmarker/utils"
                @@ -6,0 +7 @@
                +require "commonmarker/config"
                @@ -8 +8,0 @@
                -require "commonmarker/renderer/html_renderer"
                @@ -11,4 +11 @@
                -begin
                -  require "awesome_print"
                -rescue LoadError; end # rubocop:disable Lint/SuppressedException
                -module CommonMarker
                +module Commonmarker
                @@ -16 +13 @@
                -    # Public:  Parses a Markdown string into an HTML string.
                +    # Public: Parses a CommonMark string into an HTML string.
                @@ -19,2 +16 @@
                -    # option - Either a {Symbol} or {Array of Symbol}s indicating the render options
                -    # extensions - An {Array of Symbol}s indicating the extensions to use
                +    # options - A {Hash} of render, parse, and extension options to transform the text.
                @@ -22,2 +18,2 @@
                -    # Returns a {String} of converted HTML.
                -    def render_html(text, options = :DEFAULT, extensions = [])
                +    # Returns the `parser` node.
                +    def parse(text, options: Commonmarker::Config::OPTIONS)
                @@ -24,0 +21,2 @@
                +      raise TypeError, "text must be UTF-8 encoded; got #{text.encoding}!" unless text.encoding.name == "UTF-8"
                +      raise TypeError, "options must be a Hash; got a #{options.class}!" unless options.is_a?(Hash)
                @@ -26,2 +24,3 @@
                -      opts = Config.process_options(options, :render)
                -      Node.markdown_to_html(text.encode("UTF-8"), opts, extensions)
                +      opts = Config.process_options(options)
                +
                +      commonmark_parse(text, parse: opts.fetch(:parse, {}), render: opts.fetch(:render, {}), extension: opts.fetch(:extension, {}))
                @@ -30 +29 @@
                -    # Public: Parses a Markdown string into a `document` node.
                +    # Public: Parses a CommonMark string into an HTML string.
                @@ -32,3 +31,3 @@
                -    # string - {String} to be parsed
                -    # option - A {Symbol} or {Array of Symbol}s indicating the parse options
                -    # extensions - An {Array of Symbol}s indicating the extensions to use
                +    # text - A {String} of text
                +    # options - A {Hash} of render, parse, and extension options to transform the text.
                +    # plugins - A {Hash} of additional plugins.
                @@ -36,2 +35,2 @@
                -    # Returns the `document` node.
                -    def render_doc(text, options = :DEFAULT, extensions = [])
                +    # Returns a {String} of converted HTML.
                +    def to_html(text, options: Commonmarker::Config::OPTIONS, plugins: Commonmarker::Config::PLUGINS)
                @@ -38,0 +38,5 @@
                +      raise TypeError, "text must be UTF-8 encoded; got #{text.encoding}!" unless text.encoding.name == "UTF-8"
                +      raise TypeError, "options must be a Hash; got a #{options.class}!" unless options.is_a?(Hash)
                +
                +      opts = Config.process_options(options)
                +      plugins = Config.process_plugins(plugins)
                @@ -40,3 +44 @@
                -      opts = Config.process_options(options, :parse)
                -      text = text.encode("UTF-8")
                -      Node.parse_document(text, text.bytesize, opts, extensions)
                +      commonmark_to_html(text, parse: opts.fetch(:parse, {}), render: opts.fetch(:render, {}), extension: opts.fetch(:extension, {}), plugins: plugins)
                @@ -44 +46 @@
                -end
                +  end
        lib/commonmarker/config.rb
                --- /tmp/d20260126-375-n4aq82/commonmarker-0.23.10/lib/commonmarker/config.rb	2026-01-26 03:34:14.422670610 +0000
                +++ /tmp/d20260126-375-n4aq82/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/config.rb	2026-01-26 03:34:14.579670940 +0000
                @@ -3,2 +3 @@
                -module CommonMarker
                -  # For Ruby::Enum, these must be classes, not modules
                +module Commonmarker
                @@ -6,2 +5,3 @@
                -    # See https://github.com/github/cmark-gfm/blob/master/src/cmark-gfm.h#L673
                -    OPTS = {
                +    # For details, see
                +    # https://github.com/kivikakk/comrak/blob/162ef9354deb2c9b4a4e05be495aa372ba5bb696/src/main.rs#L201
                +    OPTIONS = {
                @@ -9,8 +9,6 @@
                -        DEFAULT: 0,
                -        SOURCEPOS: (1 << 1),
                -        UNSAFE: (1 << 17),
                -        VALIDATE_UTF8: (1 << 9),
                -        SMART: (1 << 10),
                -        LIBERAL_HTML_TAG: (1 << 12),
                -        FOOTNOTES: (1 << 13),
                -        STRIKETHROUGH_DOUBLE_TILDE: (1 << 14),
                +        smart: false,
                +        default_info_string: "",
                +        relaxed_tasklist_matching: false,
                +        relaxed_autolinks: false,
                +        leave_footnote_definitions: false,
                +        ignore_setext: false,
                @@ -19,13 +17,12 @@
                -        DEFAULT: 0,
                -        SOURCEPOS: (1 << 1),
                -        HARDBREAKS: (1 << 2),
                -        UNSAFE: (1 << 17),
                -        NOBREAKS: (1 << 4),
                -        VALIDATE_UTF8: (1 << 9),
                -        SMART: (1 << 10),
                -        GITHUB_PRE_LANG: (1 << 11),
                -        LIBERAL_HTML_TAG: (1 << 12),
                -        FOOTNOTES: (1 << 13),
                -        STRIKETHROUGH_DOUBLE_TILDE: (1 << 14),
                -        TABLE_PREFER_STYLE_ATTRIBUTES: (1 << 15),
                -        FULL_INFO_STRING: (1 << 16),
                +        hardbreaks: true,
                +        github_pre_lang: true,
                +        full_info_string: false,
                +        width: 80,
                +        unsafe: false,
                +        escape: false,
                +        sourcepos: false,
                +        escaped_char_spans: true,
                +        ignore_empty_links: false,
                +        gfm_quirks: false,
                +        prefer_fenced: false,
                +        tasklist_classes: false,
                @@ -33 +30,28 @@
                -      format: [:html, :xml, :commonmark, :plaintext].freeze,
                +      extension: {
                +        strikethrough: true,
                +        tagfilter: true,
                +        table: true,
                +        autolink: true,
                +        tasklist: true,
                +        superscript: false,
                +        header_ids: "",
                +        footnotes: false,
                +        inline_footnotes: false,
                +        description_lists: false,
                +        front_matter_delimiter: "",
                +        multiline_block_quotes: false,
                +        math_dollars: false,
                +        math_code: false,
                +        shortcodes: true,
                +        wikilinks_title_before_pipe: false,
                +        wikilinks_title_after_pipe: false,
                +        underline: false,
                +        spoiler: false,
                +        greentext: false,
                +        subscript: false,
                +        subtext: false,
                +        alerts: false,
                +        cjk_friendly_emphasis: false,
                +        highlight: false,
                +      }.freeze,
                +      format: [:html].freeze,
                @@ -35,0 +60,7 @@
                +    PLUGINS = {
                +      syntax_highlighter: {
                +        theme: "base16-ocean.dark",
                +        path: "",
                +      },
                +    }
                +
                @@ -37,11 +68,31 @@
                -      def process_options(option, type)
                -        case option
                -        when Symbol
                -          OPTS.fetch(type).fetch(option)
                -        when Array
                -          raise TypeError if option.none?
                -
                -          # neckbearding around. the map will both check the opts and then bitwise-OR it
                -          OPTS.fetch(type).fetch_values(*option).inject(0, :|)
                -        else
                -          raise TypeError, "option type must be a valid symbol or array of symbols within the #{name}::OPTS[:#{type}] context"
                +      include Commonmarker::Utils
                +
                +      def process_options(options)
                +        {
                +          parse: process_parse_options(options[:parse].dup),
                +          render: process_render_options(options[:render].dup),
                +          extension: process_extension_options(options[:extension].dup),
                +        }
                +      end
                +
                +      def process_plugins(plugins)
                +        {
                +          syntax_highlighter: process_syntax_highlighter_plugin(plugins&.fetch(:syntax_highlighter, nil)),
                +        }
                +      end
                +    end
                +
                +    [:parse, :render, :extension].each do |type|
                +      define_singleton_method :"process_#{type}_options" do |options|
                +        Commonmarker::Config::OPTIONS[type].each_with_object({}) do |(key, value), hash|
                +          if options.nil? || !options.key?(key) # option not provided, use the default
                +            hash[key] = value
                +            next
                +          end
                +
                +          if options[key].nil? # # option explicitly not included, remove it
                +            options.delete(key)
                +            next
                +          end
                +
                +          hash[key] = fetch_kv(options, key, value, type)
                @@ -49,2 +99,0 @@
                -      rescue KeyError => e
                -        raise TypeError, "option ':#{e.key}' does not exist for #{name}::OPTS[:#{type}]"
                @@ -52 +101,10 @@
                -  end
                +    end
                +
                +    define_singleton_method :process_syntax_highlighter_plugin do |options|
                +      return if options.nil? # plugin explicitly nil, remove it
                +
                +      raise TypeError, "Expected a Hash for syntax_highlighter plugin, got #{options.class}" unless options.is_a?(Hash)
                +      raise TypeError, "Expected a Hash for syntax_highlighter plugin, got nothing" if options.empty?
                +
                +      Commonmarker::Config::PLUGINS[:syntax_highlighter].merge(options)
                +    end
        lib/commonmarker/node.rb
                --- /tmp/d20260126-375-n4aq82/commonmarker-0.23.10/lib/commonmarker/node.rb	2026-01-26 03:34:14.422670610 +0000
                +++ /tmp/d20260126-375-n4aq82/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/node.rb	2026-01-26 03:34:14.580670943 +0000
                @@ -2,0 +3 @@
                +require "commonmarker/node/ast"
                @@ -5 +6 @@
                -module CommonMarker
                +module Commonmarker
                @@ -22,10 +23,3 @@
                -    # Public: Convert the node to an HTML string.
                -    #
                -    # options - A {Symbol} or {Array of Symbol}s indicating the render options
                -    # extensions - An {Array of Symbol}s indicating the extensions to use
                -    #
                -    # Returns a {String}.
                -    def to_html(options = :DEFAULT, extensions = [])
                -      opts = Config.process_options(options, :render)
                -      _render_html(opts, extensions).force_encoding("utf-8")
                -    end
                +    # Public: Iterate over the children (if any) of the current pointer.
                +    def each
                +      return enum_for(:each) unless block_given?
                @@ -33,8 +27,6 @@
                -    # Public: Convert the node to an XML string.
                -    #
                -    # options - A {Symbol} or {Array of Symbol}s indicating the render options
                -    #
                -    # Returns a {String}.
                -    def to_xml(options = :DEFAULT)
                -      opts = Config.process_options(options, :render)
                -      _render_xml(opts).force_encoding("utf-8")
                +      child = first_child
                +      while child
                +        next_child = child.next_sibling
                +        yield child
                +        child = next_child
                +      end
                @@ -43 +35 @@
                -    # Public: Convert the node to a CommonMark string.
                +    # Public: Converts a node to an HTML string.
                @@ -45,2 +37,2 @@
                -    # options - A {Symbol} or {Array of Symbol}s indicating the render options
                -    # width - Column to wrap the output at
                +    # options - A {Hash} of render, parse, and extension options to transform the text.
                +    # plugins - A {Hash} of additional plugins.
                @@ -48,4 +40,8 @@
                -    # Returns a {String}.
                -    def to_commonmark(options = :DEFAULT, width = 120)
                -      opts = Config.process_options(options, :render)
                -      _render_commonmark(opts, width).force_encoding("utf-8")
                +    # Returns a {String} of HTML.
                +    def to_html(options: Commonmarker::Config::OPTIONS, plugins: Commonmarker::Config::PLUGINS)
                +      raise TypeError, "options must be a Hash; got a #{options.class}!" unless options.is_a?(Hash)
                +
                +      opts = Config.process_options(options)
                +      plugins = Config.process_plugins(plugins)
                +
                +      node_to_html(render: opts[:render], parse: opts[:parse], extension: opts[:extension], plugins: plugins).force_encoding("utf-8")
                @@ -54 +50 @@
                -    # Public: Convert the node to a plain text string.
                +    # Public: Convert the node to a CommonMark string.
                @@ -57 +53 @@
                -    # width - Column to wrap the output at
                +    # plugins - A {Hash} of additional plugins.
                @@ -60,8 +56,2 @@
                -    def to_plaintext(options = :DEFAULT, width = 120)
                -      opts = Config.process_options(options, :render)
                -      _render_plaintext(opts, width).force_encoding("utf-8")
                -    end
                -
                -    # Public: Iterate over the children (if any) of the current pointer.
                -    def each
                -      return enum_for(:each) unless block_given?
                +    def to_commonmark(options: Commonmarker::Config::OPTIONS, plugins: Commonmarker::Config::PLUGINS)
                +      raise TypeError, "options must be a Hash; got a #{options.class}!" unless options.is_a?(Hash)
                @@ -69,7 +59,2 @@
                -      child = first_child
                -      while child
                -        nextchild = child.next
                -        yield child
                -        child = nextchild
                -      end
                -    end
                +      opts = Config.process_options(options)
                +      plugins = Config.process_plugins(plugins)
                @@ -77,4 +62 @@
                -    # Deprecated: Please use `each` instead
                -    def each_child(&block)
                -      warn("[DEPRECATION] `each_child` is deprecated.  Please use `each` instead.")
                -      each(&block)
                +      node_to_commonmark(render: opts[:render], parse: opts[:parse], extension: opts[:extension], plugins: plugins).force_encoding("utf-8")
        lib/commonmarker/node/inspect.rb
                --- /tmp/d20260126-375-n4aq82/commonmarker-0.23.10/lib/commonmarker/node/inspect.rb	2026-01-26 03:34:14.427670621 +0000
                +++ /tmp/d20260126-375-n4aq82/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/node/inspect.rb	2026-01-26 03:34:14.580670943 +0000
                @@ -5 +5 @@
                -module CommonMarker
                +module Commonmarker
                @@ -19 +19,11 @@
                -          attrs = [:sourcepos, :string_content, :url, :title, :header_level, :list_type, :list_start, :list_tight, :fence_info].map do |name|
                +          attrs = [
                +            :source_position,
                +            :string_content,
                +            :url,
                +            :title,
                +            :header_level,
                +            :list_type,
                +            :list_start,
                +            :list_tight,
                +            :fence_info,
                +          ].filter_map do |name|
                @@ -21 +31 @@
                -          rescue NodeError
                +          rescue StandardError
                @@ -37 +47 @@
                -                node = node.next
                +                node = node.next_sibling
        lib/commonmarker/renderer.rb
                --- /tmp/d20260126-375-n4aq82/commonmarker-0.23.10/lib/commonmarker/renderer.rb	2026-01-26 03:34:14.445670659 +0000
                +++ /tmp/d20260126-375-n4aq82/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/renderer.rb	2026-01-26 03:34:14.580670943 +0000
                @@ -6 +6 @@
                -module CommonMarker
                +module Commonmarker
                @@ -8,126 +7,0 @@
                -    attr_accessor :in_tight, :warnings, :in_plain
                -
                -    def initialize(options: :DEFAULT, extensions: [])
                -      @opts = Config.process_options(options, :render)
                -      @stream = StringIO.new(+"")
                -      @need_blocksep = false
                -      @warnings = Set.new([])
                -      @in_tight = false
                -      @in_plain = false
                -      @tagfilter = extensions.include?(:tagfilter)
                -    end
                -
                -    def out(*args)
                -      args.each do |arg|
                -        case arg
                -        when :children
                -          @node.each { |child| out(child) }
                -        when Array
                -          arg.each { |x| render(x) }
                -        when Node
                -          render(arg)
                -        else
                -          @stream.write(arg)
                -        end
                -      end
                -    end
                -
                -    def render(node)
                -      @node = node
                -      if node.type == :document
                -        document(node)
                -        @stream.string
                -      elsif @in_plain && node.type != :text && node.type != :softbreak
                -        node.each { |child| render(child) }
                -      else
                -        begin
                -          send(node.type, node)
                -        rescue NoMethodError => e
                -          @warnings.add("WARNING: #{node.type} not implemented.")
                -          raise e
                -        end
                -      end
                -    end
                -
                -    def document(_node)
                -      out(:children)
                -    end
                -
                -    def code_block(node)
                -      code_block(node)
                -    end
                -
                -    def reference_def(_node); end
                -
                -    def cr
                -      return if @stream.string.empty? || @stream.string[-1] == "\n"
                -
                -      out("\n")
                -    end
                -
                -    def blocksep
                -      out("\n")
                -    end
                -
                -    def containersep
                -      cr unless @in_tight
                -    end
                -
                -    def block
                -      cr
                -      yield
                -      cr
                -    end
                -
                -    def container(starter, ender)
                -      out(starter)
                -      yield
                -      out(ender)
                -    end
                -
                -    def plain
                -      old_in_plain = @in_plain
                -      @in_plain = true
                -      yield
                -      @in_plain = old_in_plain
                -    end
                -
                -    private
                -
                -    def escape_href(str)
                -      @node.html_escape_href(str)
                -    end
                -
                -    def escape_html(str)
                -      @node.html_escape_html(str)
                -    end
                -
                -    def tagfilter(str)
                -      if @tagfilter
                -        str.gsub(
                -          %r{
                -            <
                -            (
                -            title|textarea|style|xmp|iframe|
                -            noembed|noframes|script|plaintext
                -            )
                -            (?=\s|>|/>)
                -          }xi,
                -          '&lt;\1',
                -        )
                -      else
                -        str
                -      end
                -    end
                -
                -    def sourcepos(node)
                -      return "" unless option_enabled?(:SOURCEPOS)
                -
                -      s = node.sourcepos
                -      " data-sourcepos=\"#{s[:start_line]}:#{s[:start_column]}-" \
                -        "#{s[:end_line]}:#{s[:end_column]}\""
                -    end
                -
                -    def option_enabled?(opt)
                -      (@opts & CommonMarker::Config::OPTS.dig(:render, opt)) != 0
                -    end
        lib/commonmarker/version.rb
                --- /tmp/d20260126-375-n4aq82/commonmarker-0.23.10/lib/commonmarker/version.rb	2026-01-26 03:34:14.446670661 +0000
                +++ /tmp/d20260126-375-n4aq82/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/version.rb	2026-01-26 03:34:14.580670943 +0000
                @@ -3,2 +3,2 @@
                -module CommonMarker
                -  VERSION = "0.23.10"
                +module Commonmarker
                +  VERSION = "2.6.3"

@github-actions
Copy link
Contributor

gem compare --diff commonmarker 0.23.10 2.6.3

Compared versions: ["0.23.10", "2.6.3"]
  DIFFERENT files:
    0.23.10->2.6.3:
      * Deleted:
            Rakefile
            bin/commonmarker
            commonmarker.gemspec
            ext/commonmarker/arena.c
            ext/commonmarker/autolink.c
            ext/commonmarker/autolink.h
            ext/commonmarker/blocks.c
            ext/commonmarker/buffer.c
            ext/commonmarker/buffer.h
            ext/commonmarker/case_fold_switch.inc
            ext/commonmarker/chunk.h
            ext/commonmarker/cmark-gfm-core-extensions.h
            ext/commonmarker/cmark-gfm-extension_api.h
            ext/commonmarker/cmark-gfm-extensions_export.h
            ext/commonmarker/cmark-gfm.h
            ext/commonmarker/cmark-gfm_export.h
            ext/commonmarker/cmark-gfm_version.h
            ext/commonmarker/cmark.c
            ext/commonmarker/cmark_ctype.c
            ext/commonmarker/cmark_ctype.h
            ext/commonmarker/commonmark.c
            ext/commonmarker/commonmarker.c
            ext/commonmarker/commonmarker.h
            ext/commonmarker/config.h
            ext/commonmarker/core-extensions.c
            ext/commonmarker/entities.inc
            ext/commonmarker/ext_scanners.c
            ext/commonmarker/ext_scanners.h
            ext/commonmarker/extconf.rb
            ext/commonmarker/footnotes.c
            ext/commonmarker/footnotes.h
            ext/commonmarker/houdini.h
            ext/commonmarker/houdini_href_e.c
            ext/commonmarker/houdini_html_e.c
            ext/commonmarker/houdini_html_u.c
            ext/commonmarker/html.c
            ext/commonmarker/html.h
            ext/commonmarker/inlines.c
            ext/commonmarker/inlines.h
            ext/commonmarker/iterator.c
            ext/commonmarker/iterator.h
            ext/commonmarker/latex.c
            ext/commonmarker/linked_list.c
            ext/commonmarker/man.c
            ext/commonmarker/map.c
            ext/commonmarker/map.h
            ext/commonmarker/node.c
            ext/commonmarker/node.h
            ext/commonmarker/parser.h
            ext/commonmarker/plaintext.c
            ext/commonmarker/plugin.c
            ext/commonmarker/plugin.h
            ext/commonmarker/references.c
            ext/commonmarker/references.h
            ext/commonmarker/registry.c
            ext/commonmarker/registry.h
            ext/commonmarker/render.c
            ext/commonmarker/render.h
            ext/commonmarker/scanners.c
            ext/commonmarker/scanners.h
            ext/commonmarker/scanners.re
            ext/commonmarker/strikethrough.c
            ext/commonmarker/strikethrough.h
            ext/commonmarker/syntax_extension.c
            ext/commonmarker/syntax_extension.h
            ext/commonmarker/table.c
            ext/commonmarker/table.h
            ext/commonmarker/tagfilter.c
            ext/commonmarker/tagfilter.h
            ext/commonmarker/tasklist.c
            ext/commonmarker/tasklist.h
            ext/commonmarker/utf8.c
            ext/commonmarker/utf8.h
            ext/commonmarker/xml.c
            lib/commonmarker/renderer/html_renderer.rb
      * Added:
              (!) Unexpected permissions: 100755
              (!) File is executable
              (!) Unexpected permissions: 100755
              (!) File is executable
              (!) Unexpected permissions: 100755
              (!) File is executable
              (!) Unexpected permissions: 100755
              (!) File is executable
        lib/commonmarker/3.2/commonmarker.so
                Binary files /tmp/20260126-519-n1syod and /tmp/d20260126-519-nw5cr1/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/3.2/commonmarker.so differ
        lib/commonmarker/3.3/commonmarker.so
                Binary files /tmp/20260126-519-wr4qqp and /tmp/d20260126-519-nw5cr1/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/3.3/commonmarker.so differ
        lib/commonmarker/3.4/commonmarker.so
                Binary files /tmp/20260126-519-5krkpl and /tmp/d20260126-519-nw5cr1/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/3.4/commonmarker.so differ
        lib/commonmarker/4.0/commonmarker.so
                Binary files /tmp/20260126-519-cgmpsx and /tmp/d20260126-519-nw5cr1/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/4.0/commonmarker.so differ
        lib/commonmarker/constants.rb
                --- /tmp/20260126-519-f1i6cx	2026-01-26 03:34:16.860531259 +0000
                +++ /tmp/d20260126-519-nw5cr1/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/constants.rb	2026-01-26 03:34:16.733531301 +0000
                @@ -0,0 +1,7 @@
                +# frozen_string_literal: true
                +
                +module Commonmarker
                +  module Constants
                +    BOOLS = [true, false].freeze
                +  end
                +end
        lib/commonmarker/extension.rb
                --- /tmp/20260126-519-ms6xcn	2026-01-26 03:34:16.862531258 +0000
                +++ /tmp/d20260126-519-nw5cr1/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/extension.rb	2026-01-26 03:34:16.733531301 +0000
                @@ -0,0 +1,14 @@
                +# frozen_string_literal: true
                +
                +begin
                +  # native precompiled gems package shared libraries in <gem_dir>/lib/commonmarker/<ruby_version>
                +  # load the precompiled extension file
                +  ruby_version = /\d+\.\d+/.match(RUBY_VERSION)
                +  require_relative "#{ruby_version}/commonmarker"
                +rescue LoadError
                +  # fall back to the extension compiled upon installation.
                +  # use "require" instead of "require_relative" because non-native gems will place C extension files
                +  # in Gem::BasicSpecification#extension_dir after compilation (during normal installation), which
                +  # is in $LOAD_PATH but not necessarily relative to this file (see nokogiri#2300)
                +  require "commonmarker/commonmarker"
                +end
        lib/commonmarker/node/ast.rb
                --- /tmp/20260126-519-f1m0wn	2026-01-26 03:34:16.863531258 +0000
                +++ /tmp/d20260126-519-nw5cr1/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/node/ast.rb	2026-01-26 03:34:16.733531301 +0000
                @@ -0,0 +1,8 @@
                +# frozen_string_literal: true
                +
                +module Commonmarker
                +  class Node
                +    class Ast
                +    end
                +  end
                +end
        lib/commonmarker/utils.rb
                --- /tmp/20260126-519-xckqhd	2026-01-26 03:34:16.864531258 +0000
                +++ /tmp/d20260126-519-nw5cr1/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/utils.rb	2026-01-26 03:34:16.734531300 +0000
                @@ -0,0 +1,22 @@
                +# frozen_string_literal: true
                +
                +require "commonmarker/constants"
                +
                +module Commonmarker
                +  module Utils
                +    include Commonmarker::Constants
                +
                +    def fetch_kv(options, key, value, type)
                +      value_klass = value.class
                +
                +      if Constants::BOOLS.include?(value) && BOOLS.include?(options[key])
                +        options[key]
                +      elsif options[key].is_a?(value_klass)
                +        options[key]
                +      else
                +        expected_type = Constants::BOOLS.include?(value) ? "Boolean" : value_klass.to_s
                +        raise TypeError, "#{type} option `:#{key}` must be #{expected_type}; got #{options[key].class}"
                +      end
                +    end
                +  end
                +end
      * Changed:
              (!) Shebang probably lost: #!/usr/bin/env ruby
        README.md
                --- /tmp/d20260126-519-nw5cr1/commonmarker-0.23.10/README.md	2026-01-26 03:34:16.544531363 +0000
                +++ /tmp/d20260126-519-nw5cr1/commonmarker-2.6.3-x86_64-linux/README.md	2026-01-26 03:34:16.608531342 +0000
                @@ -1 +1 @@
                -# CommonMarker
                +# Commonmarker
                @@ -3 +3 @@
                -![Build Status](https://github.com/gjtorikian/commonmarker/workflows/CI/badge.svg) [![Gem Version](https://badge.fury.io/rb/commonmarker.svg)](http://badge.fury.io/rb/commonmarker)
                +Ruby wrapper for Rust's [comrak](https://github.com/kivikakk/comrak) crate.
                @@ -5,2 +5 @@
                -Ruby wrapper for [libcmark-gfm](https://github.com/github/cmark),
                -GitHub's fork of the reference parser for CommonMark. It passes all of the C tests, 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.
                +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.
                @@ -8 +7,4 @@
                -For more information on available extensions, see [the documentation below](#extensions).
                +> [!NOTE]
                +> By default, several extensions not in any spec have been enabled, for the sake of end user convenience when generating HTML.
                +>
                +> For more information on the available options and extensions, see [the documentation below](#options-and-plugins).
                @@ -25,0 +28,2 @@
                +This gem expects to receive UTF-8 strings. Ensure your strings are the right encoding before passing them into `Commonmarker`.
                +
                @@ -28 +32 @@
                -Call `render_html` on a string to convert it to HTML:
                +Call `to_html` on a string to convert it to HTML:
                @@ -30 +34 @@
                -``` ruby
                +```ruby
                @@ -32,2 +36,4 @@
                -CommonMarker.render_html('Hi *there*', :DEFAULT)
                -# <p>Hi <em>there</em></p>\n
                +Commonmarker.to_html('"Hi *there*"', options: {
                +    parse: { smart: true }
                +})
                +# => <p>“Hi <em>there</em>”</p>\n
                @@ -36 +42 @@
                -The second argument is optional--[see below](#options) for more information.
                +(The second argument is optional--[see below](#options-and-plugins) for more information.)
                @@ -40 +46 @@
                -You can also parse a string to receive a `Document` node. You can then print that node to HTML, iterate over the children, and other fun node stuff. For example:
                +You can also parse a string to receive a `:document` node. You can then print that node to HTML, iterate over the children, and do other fun node stuff. For example:
                @@ -42 +48 @@
                -``` ruby
                +```ruby
                @@ -45,2 +51,4 @@
                -doc = CommonMarker.render_doc('*Hello* world', :DEFAULT)
                -puts(doc.to_html) # <p>Hi <em>there</em></p>\n
                +doc = Commonmarker.parse("*Hello* world", options: {
                +    parse: { smart: true }
                +})
                +puts(doc.to_html) # => <p><em>Hello</em> world</p>\n
                @@ -49 +57 @@
                -  puts node.type # [:document, :paragraph, :text, :emph, :text]
                +  puts node.type # => [:document, :paragraph, :emph, :text, :text]
                @@ -53 +61,27 @@
                -The second argument is optional--[see below](#options) for more information.
                +(The second argument is optional--[see below](#options-and-plugins) for more information.)
                +
                +When it comes to modifying the document, you can perform the following operations:
                +
                +- `insert_before`
                +- `insert_after`
                +- `prepend_child`
                +- `append_child`
                +- `delete`
                +
                +You can also get the source position of a node by calling `source_position`:
                +
                +```ruby
                +doc = Commonmarker.parse("*Hello* world")
                +puts doc.first_child.first_child.source_position
                +# => {:start_line=>1, :start_column=>1, :end_line=>1, :end_column=>7}
                +```
                +
                +You can also modify the following attributes:
                +
                +- `url`
                +- `title`
                +- `header_level`
                +- `list_type`
                +- `list_start`
                +- `list_tight`
                +- `fence_info`
                @@ -55 +89 @@
                -#### Example: walking the AST
                +#### Example: Walking the AST
                @@ -60 +94 @@
                -- `each` will iterate on a node and its children, but no further.
                +- `each` will iterate on a node's direct children, but no further.
                @@ -62 +96 @@
                -``` ruby
                +```ruby
                @@ -65,2 +99,2 @@
                -# parse the files specified on the command line
                -doc = CommonMarker.render_doc("# The site\n\n [GitHub](https://www.github.com)")
                +# parse some string
                +doc = Commonmarker.parse("# The site\n\n [GitHub](https://www.github.com)")
                @@ -74,11 +108 @@
                -
                -# Capitalize all regular text in headers
                -doc.walk do |node|
                -  if node.type == :header
                -    node.each do |subnode|
                -      if subnode.type == :text
                -        subnode.string_content = subnode.string_content.upcase
                -      end
                -    end
                -  end
                -end
                +# => URL = https://www.github.com
                @@ -92,0 +117 @@
                +# => <h1><a href=\"#the-site\"></a>The site</h1>\n<p>GitHub</p>\n
                @@ -95 +120 @@
                -### Creating a custom renderer
                +#### Example: Converting a document back into raw CommonMark
                @@ -97 +122 @@
                -You can also derive a class from CommonMarker's `HtmlRenderer` class. This produces slower output, but is far more customizable. For example:
                +You can use `to_commonmark` on a node to render it as raw text:
                @@ -99,6 +124,2 @@
                -``` ruby
                -class MyHtmlRenderer < CommonMarker::HtmlRenderer
                -  def initialize
                -    super
                -    @headerid = 1
                -  end
                +```ruby
                +require 'commonmarker'
                @@ -106,6 +127,8 @@
                -  def header(node)
                -    block do
                -      out("<h", node.header_level, " id=\"", @headerid, "\">",
                -               :children, "</h", node.header_level, ">")
                -      @headerid += 1
                -    end
                +# parse some string
                +doc = Commonmarker.parse("# The site\n\n [GitHub](https://www.github.com)")
                +
                +# Transform links to regular text
                +doc.walk do |node|
                +  if node.type == :link
                +    node.insert_before(node.first_child)
                +    node.delete
                @@ -115,7 +138,2 @@
                -myrenderer = MyHtmlRenderer.new
                -puts myrenderer.render(doc)
                -
                -# Print any warnings to STDERR
                -renderer.warnings.each do |w|
                -  STDERR.write("#{w}\n")
                -end
                +doc.to_commonmark
                +# => # The site\n\nGitHub\n
                @@ -124,16 +142 @@
                -## Options
                -
                -CommonMarker accepts the same options that CMark does, as symbols. Note that there is a distinction in CMark for "parse" options and "render" options, which are represented in the tables below.
                -
                -### Parse options
                -
                -| Name                          | Description
                -| ----------------------------- | -----------
                -| `:DEFAULT`                    | The default parsing system.
                -| `:SOURCEPOS`                  | Include source position in nodes
                -| `:UNSAFE`                     | Allow raw/custom HTML and unsafe links.
                -| `:VALIDATE_UTF8`              | Replace illegal sequences with the replacement character `U+FFFD`.
                -| `:SMART`                      | Use smart punctuation (curly quotes, etc.).
                -| `:LIBERAL_HTML_TAG`           | Support liberal parsing of inline HTML tags.
                -| `:FOOTNOTES`                  | Parse footnotes.
                -| `:STRIKETHROUGH_DOUBLE_TILDE` | Parse strikethroughs by double tildes (compatibility with [redcarpet](https://github.com/vmg/redcarpet))
                +## Options and plugins
                @@ -141,17 +144 @@
                -### Render options
                -
                -| Name                             | Description                                                     |
                -| ------------------               | -----------                                                     |
                -| `:DEFAULT`                       | The default rendering system.                                   |
                -| `:SOURCEPOS`                     | Include source position in rendered HTML.                       |
                -| `:HARDBREAKS`                    | Treat `\n` as hardbreaks (by adding `<br/>`).                   |
                -| `:UNSAFE`                        | Allow raw/custom HTML and unsafe links.                         |
                -| `:NOBREAKS`                      | Translate `\n` in the source to a single whitespace.            |
                -| `:VALIDATE_UTF8`                 | Replace illegal sequences with the replacement character `U+FFFD`. |
                -| `:SMART`                         | Use smart punctuation (curly quotes, etc.).                     |
                -| `:GITHUB_PRE_LANG`               | Use GitHub-style `<pre lang>` for fenced code blocks.           |
                -| `:LIBERAL_HTML_TAG`              | Support liberal parsing of inline HTML tags.                    |
                -| `:FOOTNOTES`                     | Render footnotes.                                               |
                -| `:STRIKETHROUGH_DOUBLE_TILDE`    | Parse strikethroughs by double tildes (compatibility with [redcarpet](https://github.com/vmg/redcarpet)) |
                -| `:TABLE_PREFER_STYLE_ATTRIBUTES` | Use `style` insted of `align` for table cells.                  |
                -| `:FULL_INFO_STRING`              | Include full info strings of code blocks in separate attribute. |
                +### Options
                @@ -159 +146 @@
                -### Passing options
                +Commonmarker accepts the same parse, render, and extensions options that comrak does, as a hash dictionary with symbol keys:
                @@ -161,11 +148,5 @@
                -To apply a single option, pass it in as a symbol argument:
                -
                -``` ruby
                -CommonMarker.render_doc("\"Hello,\" said the spider.", :SMART)
                -# <p>“Hello,” said the spider.</p>\n
                -```
                -
                -To have multiple options applied, pass in an array of symbols:
                -
                -``` ruby
                -CommonMarker.render_html("\"'Shelob' is my name.\"", [:HARDBREAKS, :SOURCEPOS])
                +```ruby
                +Commonmarker.to_html('"Hi *there*"', options:{
                +  parse: { smart: true },
                +  render: { hardbreaks: false}
                +})
                @@ -174 +155 @@
                -For more information on these options, see [the CMark documentation](https://git.io/v7nh1).
                +Note that there is a distinction in comrak for "parse" options and "render" options, which are represented in the tables below. As well, if you wish to disable any-non boolean option, pass in `nil`.
                @@ -176,5 +157 @@
                -## Extensions
                -
                -Both `render_html` and `render_doc` take an optional third argument defining the extensions you want enabled as your CommonMark document is being processed. The documentation for these extensions are [defined in this spec](https://github.github.com/gfm/), and the rationale is provided [in this blog post](https://githubengineering.com/a-formal-spec-for-github-markdown/).
                -
                -The available extensions are:
                +### Parse options
                @@ -182,5 +159,8 @@
                -* `:table` - This provides support for tables.
                -* `:tasklist` - This provides support for task list items.
                -* `:strikethrough` - This provides support for strikethroughs.
                -* `:autolink` - This provides support for automatically converting URLs to anchor tags.
                -* `:tagfilter` - This escapes [several "unsafe" HTML tags](https://github.github.com/gfm/#disallowed-raw-html-extension-), causing them to not have any effect.
                +| Name                         | Description                                                                                                                                 | Default |
                +| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
                +| `smart`                      | Punctuation (quotes, full-stops and hyphens) are converted into 'smart' punctuation.                                                        | `false` |
                +| `default_info_string`        | The default info string for fenced code blocks.                                                                                             | `""`    |
                +| `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` |
                +| `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` |
                +| `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` |
                +| `ignore_setext`              | Ignores setext-style headings.                                                                                                              | `false` |
                @@ -188,3 +168 @@
                -## Output formats
                -
                -Like CMark, CommonMarker can generate output in several formats: HTML, XML, plaintext, and commonmark are currently supported.
                +### Render options
                @@ -192 +170,14 @@
                -### HTML
                +| Name                 | Description                                                                                            | Default |
                +| -------------------- | ------------------------------------------------------------------------------------------------------ | ------- |
                +| `hardbreaks`         | [Soft line breaks](http://spec.commonmark.org/0.27/#soft-line-breaks) translate into hard line breaks. | `true`  |
                +| `github_pre_lang`    | GitHub-style `<pre lang="xyz">` is used for fenced code blocks with info tags.                         | `true`  |
                +| `full_info_string`   | Gives info string data after a space in a `data-meta` attribute on code blocks.                        | `false` |
                +| `width`              | The wrap column when outputting CommonMark.                                                            | `80`    |
                +| `unsafe`             | Allow rendering of raw HTML and potentially dangerous links.                                           | `false` |
                +| `escape`             | Escape raw HTML instead of clobbering it.                                                              | `false` |
                +| `sourcepos`          | Include source position attribute in HTML and XML output.                                              | `false` |
                +| `escaped_char_spans` | Wrap escaped characters in span tags.                                                                  | `true`  |
                +| `ignore_empty_links` | Ignores empty links, leaving the Markdown text in place.                                               | `false` |
                +| `gfm_quirks`         | Outputs HTML with GFM-style quirks; namely, not nesting `<strong>` inlines.                            | `false` |
                +| `prefer_fenced`      | Always output fenced code blocks, even where an indented one could be used.                            | `false` |
                +| `tasklist_classes`   | Add CSS classes to the HTML output of the tasklist extension                                           | `false` |
                @@ -194 +185 @@
                -The default output format, HTML, will be generated when calling `to_html` or using `--to=html` on the command line.
                +As well, there are several extensions which you can toggle in the same manner:
                @@ -197,2 +188,62 @@
                -doc = CommonMarker.render_doc('*Hello* world!', :DEFAULT)
                -puts(doc.to_html)
                +Commonmarker.to_html('"Hi *there*"', options: {
                +    extension: { footnotes: true, description_lists: true },
                +    render: { hardbreaks: false }
                +})
                +```
                +
                +### Extension options
                +
                +| Name                          | Description                                                                                                         | Default |
                +| ----------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------- |
                +| `strikethrough`               | Enables the [strikethrough extension](https://github.github.com/gfm/#strikethrough-extension-) from the GFM spec.   | `true`  |
                +| `tagfilter`                   | Enables the [tagfilter extension](https://github.github.com/gfm/#disallowed-raw-html-extension-) from the GFM spec. | `true`  |
                +| `table`                       | Enables the [table extension](https://github.github.com/gfm/#tables-extension-) from the GFM spec.                  | `true`  |
                +| `autolink`                    | Enables the [autolink extension](https://github.github.com/gfm/#autolinks-extension-) from the GFM spec.            | `true`  |
                +| `tasklist`                    | Enables the [task list extension](https://github.github.com/gfm/#task-list-items-extension-) from the GFM spec.     | `true`  |
                +| `superscript`                 | Enables the superscript Comrak extension.                                                                           | `false` |
                +| `header_ids`                  | Enables the header IDs Comrak extension. from the GFM spec.                                                         | `""`    |
                +| `footnotes`                   | Enables the footnotes extension per `cmark-gfm`.                                                                    | `false` |
                +| `inline_footnotes`            | Enables the inline footnotes extension.                                                                             | `false` |
                +| `description_lists`           | Enables the description lists extension.                                                                            | `false` |
                +| `front_matter_delimiter`      | Enables the front matter extension.                                                                                 | `""`    |
                +| `multiline_block_quotes`      | Enables the multiline block quotes extension.                                                                       | `false` |
                +| `math_dollars`, `math_code`   | Enables the math extension.                                                                                         | `false` |
                +| `shortcodes`                  | Enables the shortcodes extension.                                                                                   | `true`  |
                +| `wikilinks_title_before_pipe` | Enables the wikilinks extension, placing the title before the dividing pipe.                                        | `false` |
                +| `wikilinks_title_after_pipe`  | Enables the wikilinks extension, placing the title after the dividing pipe.                                         | `false` |
                +| `underline`                   | Enables the underline extension.                                                                                    | `false` |
                +| `spoiler`                     | Enables the spoiler extension.                                                                                      | `false` |
                +| `greentext`                   | Enables the greentext extension.                                                                                    | `false` |
                +| `subtext`                     | Enables the subtext extension.                                                                                      | `false` |
                +| `subscript`                   | Enables the subscript extension.                                                                                    | `false` |
                +| `alerts`                      | Enables the alerts extension.                                                                                       | `false` |
                +| `cjk_friendly_emphasis`       | Enables the [CJK friendly emphasis](https://github.com/tats-u/markdown-cjk-friendly) extension.                     | `false` |
                +| `highlight`                   | Enables highlighting via `==`                                                                                       | `false` |
                +
                +For more information on these options, see [the comrak documentation](https://github.com/kivikakk/comrak#usage).
                +
                +### Plugins
                +
                +In addition to the possibilities provided by generic CommonMark rendering, Commonmarker also supports plugins as a means of
                +providing further niceties.
                +
                +#### Syntax Highlighter Plugin
                +
                +The library comes with [a set of pre-existing themes](https://docs.rs/syntect/5.0.0/syntect/highlighting/struct.ThemeSet.html#implementations) for highlighting code:
                +
                +- `"base16-ocean.dark"`
                +- `"base16-eighties.dark"`
                +- `"base16-mocha.dark"`
                +- `"base16-ocean.light"`
                +- `"InspiredGitHub"`
                +- `"Solarized (dark)"`
                +- `"Solarized (light)"`
                +
                +````ruby
                +code = <<~CODE
                +  ```ruby
                +  def hello
                +    puts "hello"
                +  end
                +  ```
                +CODE
                @@ -200,2 +251,2 @@
                -<p><em>Hello</em> world!</p>
                -```
                +# pass in a theme name from a pre-existing set
                +puts Commonmarker.to_html(code, plugins: { syntax_highlighter: { theme: "InspiredGitHub" } })
                @@ -203 +254,20 @@
                -### XML
                +# <pre style="background-color:#ffffff;" lang="ruby"><code>
                +# <span style="font-weight:bold;color:#a71d5d;">def </span><span style="font-weight:bold;color:#795da3;">hello
                +# </span><span style="color:#62a35c;">puts </span><span style="color:#183691;">&quot;hello&quot;
                +# </span><span style="font-weight:bold;color:#a71d5d;">end
                +# </span>
                +# </code></pre>
                +````
                +
                +By default, the plugin uses the `"base16-ocean.dark"` theme to syntax highlight code.
                +
                +To disable this plugin, set the value to `nil`:
                +
                +````ruby
                +code = <<~CODE
                +  ```ruby
                +  def hello
                +    puts "hello"
                +  end
                +  ```
                +CODE
                @@ -205 +275 @@
                -XML will be generated when calling `to_xml` or using `--to=xml` on the command line.
                +Commonmarker.to_html(code, plugins: { syntax_highlighter: nil })
                @@ -207,3 +277,15 @@
                -```ruby
                -doc = CommonMarker.render_doc('*Hello* world!', :DEFAULT)
                -puts(doc.to_xml)
                +# <pre lang="ruby"><code>def hello
                +#   puts &quot;hello&quot;
                +# end
                +# </code></pre>
                +````
                +
                +To output CSS classes instead of `style` attributes, set the `theme` key to `""`:
                +
                +````ruby
                +code = <<~CODE
                +  ```ruby
                +  def hello
                +    puts "hello"
                +  end
                +CODE
                @@ -211,11 +293 @@
                -<?xml version="1.0" encoding="UTF-8"?>
                -<!DOCTYPE document SYSTEM "CommonMark.dtd">
                -<document xmlns="http://commonmark.org/xml/1.0">
                -  <paragraph>
                -    <emph>
                -      <text xml:space="preserve">Hello</text>
                -    </emph>
                -    <text xml:space="preserve"> world!</text>
                -  </paragraph>
                -</document>
                -```
                +Commonmarker.to_html(code, plugins: { syntax_highlighter: { theme: "" } })
                @@ -223 +295,4 @@
                -### Plaintext
                +# <pre class="syntax-highlighting"><code><span class="source ruby"><span class="meta function ruby"><span class="keyword control def ruby">def</span></span><span class="meta function ruby"> # <span class="entity name function ruby">hello</span></span>
                +#   <span class="support function builtin ruby">puts</span> <span class="string quoted double ruby"><span class="punctuation definition string begin ruby">&quot;</span>hello<span class="punctuation definition string end ruby">&quot;</span></span>
                +# <span class="keyword control ruby">end</span>\n</span></code></pre>
                +````
                @@ -225 +300 @@
                -Plaintext will be generated when calling `to_plaintext` or using `--to=plaintext` on the command line.
                +To use a custom theme, you can provide a `path` to a directory containing `.tmtheme` files to load:
                @@ -228,4 +303 @@
                -doc = CommonMarker.render_doc('*Hello* world!', :DEFAULT)
                -puts(doc.to_plaintext)
                -
                -Hello world!
                +Commonmarker.to_html(code, plugins: { syntax_highlighter: { theme: "Monokai", path: "./themes" } })
                @@ -234,11 +306 @@
                -### Commonmark
                -
                -Commonmark will be generated when calling `to_commonmark` or using `--to=commonmark` on the command line.
                -
                -``` ruby
                -text = <<-TEXT
                -1. I am a numeric list.
                -2. I continue the list.
                -* Suddenly, an unordered list!
                -* What fun!
                -TEXT
                +## Output formats
                @@ -246,2 +308 @@
                -doc = CommonMarker.render_doc(text, :DEFAULT)
                -puts(doc.to_commonmark)
                +Commonmarker can currently only generate output in one format: HTML.
                @@ -249,2 +310 @@
                -1.  I am a numeric list.
                -2.  I continue the list.
                +### HTML
                @@ -252 +312,2 @@
                -<!-- end list -->
                +```ruby
                +puts Commonmarker.to_html('*Hello* world!')
                @@ -254,2 +315 @@
                -  - Suddenly, an unordered list\!
                -  - What fun\!
                +# <p><em>Hello</em> world!</p>
                @@ -267 +327 @@
                -If there were no errors, you're done! Otherwise, make sure to follow the CMark dependency instructions.
                +If there were no errors, you're done! Otherwise, make sure to follow the comrak dependency instructions.
                @@ -271,2 +330,0 @@
                -Some rough benchmarks:
                -
                @@ -274,3 +332,2 @@
                -$ bundle exec rake benchmark
                -
                -input size = 11063727 bytes
                +❯ bundle exec rake benchmark
                +input size = 11064832 bytes
                @@ -278,10 +335,24 @@
                -redcarpet
                -  0.070000   0.020000   0.090000 (  0.079641)
                -github-markdown
                -  0.070000   0.010000   0.080000 (  0.083535)
                -commonmarker with to_html
                -  0.100000   0.010000   0.110000 (  0.111947)
                -commonmarker with ruby HtmlRenderer
                -  1.830000   0.030000   1.860000 (  1.866203)
                -kramdown
                -  4.610000   0.070000   4.680000 (  4.678398)
                +ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
                +Warming up --------------------------------------
                +  Markly.render_html     1.000 i/100ms
                +Markly::Node#to_html     1.000 i/100ms
                +Commonmarker.to_html     1.000 i/100ms
                +Commonmarker::Node.to_html
                +                         1.000 i/100ms
                +Kramdown::Document#to_html
                +                         1.000 i/100ms
                +Calculating -------------------------------------
                +  Markly.render_html     15.606 (±25.6%) i/s -     71.000 in   5.047132s
                +Markly::Node#to_html     15.692 (±25.5%) i/s -     72.000 in   5.095810s
                +Commonmarker.to_html      4.482 (± 0.0%) i/s -     23.000 in   5.137680s
                +Commonmarker::Node.to_html
                +                          5.092 (±19.6%) i/s -     25.000 in   5.072220s
                +Kramdown::Document#to_html
                +                          0.379 (± 0.0%) i/s -      2.000 in   5.277770s
                +
                +Comparison:
                +Markly::Node#to_html:       15.7 i/s
                +  Markly.render_html:       15.6 i/s - same-ish: difference falls within error
                +Commonmarker::Node.to_html:        5.1 i/s - 3.08x  slower
                +Commonmarker.to_html:        4.5 i/s - 3.50x  slower
                +Kramdown::Document#to_html:        0.4 i/s - 41.40x  slower
        lib/commonmarker.rb
                --- /tmp/d20260126-519-nw5cr1/commonmarker-0.23.10/lib/commonmarker.rb	2026-01-26 03:34:16.594531346 +0000
                +++ /tmp/d20260126-519-nw5cr1/commonmarker-2.6.3-x86_64-linux/lib/commonmarker.rb	2026-01-26 03:34:16.608531342 +0000
                @@ -1 +0,0 @@
                -#!/usr/bin/env ruby
                @@ -4,2 +3,3 @@
                -require "commonmarker/commonmarker"
                -require "commonmarker/config"
                +require_relative "commonmarker/extension"
                +
                +require "commonmarker/utils"
                @@ -6,0 +7 @@
                +require "commonmarker/config"
                @@ -8 +8,0 @@
                -require "commonmarker/renderer/html_renderer"
                @@ -11,4 +11 @@
                -begin
                -  require "awesome_print"
                -rescue LoadError; end # rubocop:disable Lint/SuppressedException
                -module CommonMarker
                +module Commonmarker
                @@ -16 +13 @@
                -    # Public:  Parses a Markdown string into an HTML string.
                +    # Public: Parses a CommonMark string into an HTML string.
                @@ -19,2 +16 @@
                -    # option - Either a {Symbol} or {Array of Symbol}s indicating the render options
                -    # extensions - An {Array of Symbol}s indicating the extensions to use
                +    # options - A {Hash} of render, parse, and extension options to transform the text.
                @@ -22,2 +18,2 @@
                -    # Returns a {String} of converted HTML.
                -    def render_html(text, options = :DEFAULT, extensions = [])
                +    # Returns the `parser` node.
                +    def parse(text, options: Commonmarker::Config::OPTIONS)
                @@ -24,0 +21,2 @@
                +      raise TypeError, "text must be UTF-8 encoded; got #{text.encoding}!" unless text.encoding.name == "UTF-8"
                +      raise TypeError, "options must be a Hash; got a #{options.class}!" unless options.is_a?(Hash)
                @@ -26,2 +24,3 @@
                -      opts = Config.process_options(options, :render)
                -      Node.markdown_to_html(text.encode("UTF-8"), opts, extensions)
                +      opts = Config.process_options(options)
                +
                +      commonmark_parse(text, parse: opts.fetch(:parse, {}), render: opts.fetch(:render, {}), extension: opts.fetch(:extension, {}))
                @@ -30 +29 @@
                -    # Public: Parses a Markdown string into a `document` node.
                +    # Public: Parses a CommonMark string into an HTML string.
                @@ -32,3 +31,3 @@
                -    # string - {String} to be parsed
                -    # option - A {Symbol} or {Array of Symbol}s indicating the parse options
                -    # extensions - An {Array of Symbol}s indicating the extensions to use
                +    # text - A {String} of text
                +    # options - A {Hash} of render, parse, and extension options to transform the text.
                +    # plugins - A {Hash} of additional plugins.
                @@ -36,2 +35,2 @@
                -    # Returns the `document` node.
                -    def render_doc(text, options = :DEFAULT, extensions = [])
                +    # Returns a {String} of converted HTML.
                +    def to_html(text, options: Commonmarker::Config::OPTIONS, plugins: Commonmarker::Config::PLUGINS)
                @@ -38,0 +38,5 @@
                +      raise TypeError, "text must be UTF-8 encoded; got #{text.encoding}!" unless text.encoding.name == "UTF-8"
                +      raise TypeError, "options must be a Hash; got a #{options.class}!" unless options.is_a?(Hash)
                +
                +      opts = Config.process_options(options)
                +      plugins = Config.process_plugins(plugins)
                @@ -40,3 +44 @@
                -      opts = Config.process_options(options, :parse)
                -      text = text.encode("UTF-8")
                -      Node.parse_document(text, text.bytesize, opts, extensions)
                +      commonmark_to_html(text, parse: opts.fetch(:parse, {}), render: opts.fetch(:render, {}), extension: opts.fetch(:extension, {}), plugins: plugins)
                @@ -44 +46 @@
                -end
                +  end
        lib/commonmarker/config.rb
                --- /tmp/d20260126-519-nw5cr1/commonmarker-0.23.10/lib/commonmarker/config.rb	2026-01-26 03:34:16.594531346 +0000
                +++ /tmp/d20260126-519-nw5cr1/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/config.rb	2026-01-26 03:34:16.733531301 +0000
                @@ -3,2 +3 @@
                -module CommonMarker
                -  # For Ruby::Enum, these must be classes, not modules
                +module Commonmarker
                @@ -6,2 +5,3 @@
                -    # See https://github.com/github/cmark-gfm/blob/master/src/cmark-gfm.h#L673
                -    OPTS = {
                +    # For details, see
                +    # https://github.com/kivikakk/comrak/blob/162ef9354deb2c9b4a4e05be495aa372ba5bb696/src/main.rs#L201
                +    OPTIONS = {
                @@ -9,8 +9,6 @@
                -        DEFAULT: 0,
                -        SOURCEPOS: (1 << 1),
                -        UNSAFE: (1 << 17),
                -        VALIDATE_UTF8: (1 << 9),
                -        SMART: (1 << 10),
                -        LIBERAL_HTML_TAG: (1 << 12),
                -        FOOTNOTES: (1 << 13),
                -        STRIKETHROUGH_DOUBLE_TILDE: (1 << 14),
                +        smart: false,
                +        default_info_string: "",
                +        relaxed_tasklist_matching: false,
                +        relaxed_autolinks: false,
                +        leave_footnote_definitions: false,
                +        ignore_setext: false,
                @@ -19,13 +17,12 @@
                -        DEFAULT: 0,
                -        SOURCEPOS: (1 << 1),
                -        HARDBREAKS: (1 << 2),
                -        UNSAFE: (1 << 17),
                -        NOBREAKS: (1 << 4),
                -        VALIDATE_UTF8: (1 << 9),
                -        SMART: (1 << 10),
                -        GITHUB_PRE_LANG: (1 << 11),
                -        LIBERAL_HTML_TAG: (1 << 12),
                -        FOOTNOTES: (1 << 13),
                -        STRIKETHROUGH_DOUBLE_TILDE: (1 << 14),
                -        TABLE_PREFER_STYLE_ATTRIBUTES: (1 << 15),
                -        FULL_INFO_STRING: (1 << 16),
                +        hardbreaks: true,
                +        github_pre_lang: true,
                +        full_info_string: false,
                +        width: 80,
                +        unsafe: false,
                +        escape: false,
                +        sourcepos: false,
                +        escaped_char_spans: true,
                +        ignore_empty_links: false,
                +        gfm_quirks: false,
                +        prefer_fenced: false,
                +        tasklist_classes: false,
                @@ -33 +30,28 @@
                -      format: [:html, :xml, :commonmark, :plaintext].freeze,
                +      extension: {
                +        strikethrough: true,
                +        tagfilter: true,
                +        table: true,
                +        autolink: true,
                +        tasklist: true,
                +        superscript: false,
                +        header_ids: "",
                +        footnotes: false,
                +        inline_footnotes: false,
                +        description_lists: false,
                +        front_matter_delimiter: "",
                +        multiline_block_quotes: false,
                +        math_dollars: false,
                +        math_code: false,
                +        shortcodes: true,
                +        wikilinks_title_before_pipe: false,
                +        wikilinks_title_after_pipe: false,
                +        underline: false,
                +        spoiler: false,
                +        greentext: false,
                +        subscript: false,
                +        subtext: false,
                +        alerts: false,
                +        cjk_friendly_emphasis: false,
                +        highlight: false,
                +      }.freeze,
                +      format: [:html].freeze,
                @@ -35,0 +60,7 @@
                +    PLUGINS = {
                +      syntax_highlighter: {
                +        theme: "base16-ocean.dark",
                +        path: "",
                +      },
                +    }
                +
                @@ -37,11 +68,31 @@
                -      def process_options(option, type)
                -        case option
                -        when Symbol
                -          OPTS.fetch(type).fetch(option)
                -        when Array
                -          raise TypeError if option.none?
                -
                -          # neckbearding around. the map will both check the opts and then bitwise-OR it
                -          OPTS.fetch(type).fetch_values(*option).inject(0, :|)
                -        else
                -          raise TypeError, "option type must be a valid symbol or array of symbols within the #{name}::OPTS[:#{type}] context"
                +      include Commonmarker::Utils
                +
                +      def process_options(options)
                +        {
                +          parse: process_parse_options(options[:parse].dup),
                +          render: process_render_options(options[:render].dup),
                +          extension: process_extension_options(options[:extension].dup),
                +        }
                +      end
                +
                +      def process_plugins(plugins)
                +        {
                +          syntax_highlighter: process_syntax_highlighter_plugin(plugins&.fetch(:syntax_highlighter, nil)),
                +        }
                +      end
                +    end
                +
                +    [:parse, :render, :extension].each do |type|
                +      define_singleton_method :"process_#{type}_options" do |options|
                +        Commonmarker::Config::OPTIONS[type].each_with_object({}) do |(key, value), hash|
                +          if options.nil? || !options.key?(key) # option not provided, use the default
                +            hash[key] = value
                +            next
                +          end
                +
                +          if options[key].nil? # # option explicitly not included, remove it
                +            options.delete(key)
                +            next
                +          end
                +
                +          hash[key] = fetch_kv(options, key, value, type)
                @@ -49,2 +99,0 @@
                -      rescue KeyError => e
                -        raise TypeError, "option ':#{e.key}' does not exist for #{name}::OPTS[:#{type}]"
                @@ -52 +101,10 @@
                -  end
                +    end
                +
                +    define_singleton_method :process_syntax_highlighter_plugin do |options|
                +      return if options.nil? # plugin explicitly nil, remove it
                +
                +      raise TypeError, "Expected a Hash for syntax_highlighter plugin, got #{options.class}" unless options.is_a?(Hash)
                +      raise TypeError, "Expected a Hash for syntax_highlighter plugin, got nothing" if options.empty?
                +
                +      Commonmarker::Config::PLUGINS[:syntax_highlighter].merge(options)
                +    end
        lib/commonmarker/node.rb
                --- /tmp/d20260126-519-nw5cr1/commonmarker-0.23.10/lib/commonmarker/node.rb	2026-01-26 03:34:16.594531346 +0000
                +++ /tmp/d20260126-519-nw5cr1/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/node.rb	2026-01-26 03:34:16.733531301 +0000
                @@ -2,0 +3 @@
                +require "commonmarker/node/ast"
                @@ -5 +6 @@
                -module CommonMarker
                +module Commonmarker
                @@ -22,10 +23,3 @@
                -    # Public: Convert the node to an HTML string.
                -    #
                -    # options - A {Symbol} or {Array of Symbol}s indicating the render options
                -    # extensions - An {Array of Symbol}s indicating the extensions to use
                -    #
                -    # Returns a {String}.
                -    def to_html(options = :DEFAULT, extensions = [])
                -      opts = Config.process_options(options, :render)
                -      _render_html(opts, extensions).force_encoding("utf-8")
                -    end
                +    # Public: Iterate over the children (if any) of the current pointer.
                +    def each
                +      return enum_for(:each) unless block_given?
                @@ -33,8 +27,6 @@
                -    # Public: Convert the node to an XML string.
                -    #
                -    # options - A {Symbol} or {Array of Symbol}s indicating the render options
                -    #
                -    # Returns a {String}.
                -    def to_xml(options = :DEFAULT)
                -      opts = Config.process_options(options, :render)
                -      _render_xml(opts).force_encoding("utf-8")
                +      child = first_child
                +      while child
                +        next_child = child.next_sibling
                +        yield child
                +        child = next_child
                +      end
                @@ -43 +35 @@
                -    # Public: Convert the node to a CommonMark string.
                +    # Public: Converts a node to an HTML string.
                @@ -45,2 +37,2 @@
                -    # options - A {Symbol} or {Array of Symbol}s indicating the render options
                -    # width - Column to wrap the output at
                +    # options - A {Hash} of render, parse, and extension options to transform the text.
                +    # plugins - A {Hash} of additional plugins.
                @@ -48,4 +40,8 @@
                -    # Returns a {String}.
                -    def to_commonmark(options = :DEFAULT, width = 120)
                -      opts = Config.process_options(options, :render)
                -      _render_commonmark(opts, width).force_encoding("utf-8")
                +    # Returns a {String} of HTML.
                +    def to_html(options: Commonmarker::Config::OPTIONS, plugins: Commonmarker::Config::PLUGINS)
                +      raise TypeError, "options must be a Hash; got a #{options.class}!" unless options.is_a?(Hash)
                +
                +      opts = Config.process_options(options)
                +      plugins = Config.process_plugins(plugins)
                +
                +      node_to_html(render: opts[:render], parse: opts[:parse], extension: opts[:extension], plugins: plugins).force_encoding("utf-8")
                @@ -54 +50 @@
                -    # Public: Convert the node to a plain text string.
                +    # Public: Convert the node to a CommonMark string.
                @@ -57 +53 @@
                -    # width - Column to wrap the output at
                +    # plugins - A {Hash} of additional plugins.
                @@ -60,8 +56,2 @@
                -    def to_plaintext(options = :DEFAULT, width = 120)
                -      opts = Config.process_options(options, :render)
                -      _render_plaintext(opts, width).force_encoding("utf-8")
                -    end
                -
                -    # Public: Iterate over the children (if any) of the current pointer.
                -    def each
                -      return enum_for(:each) unless block_given?
                +    def to_commonmark(options: Commonmarker::Config::OPTIONS, plugins: Commonmarker::Config::PLUGINS)
                +      raise TypeError, "options must be a Hash; got a #{options.class}!" unless options.is_a?(Hash)
                @@ -69,7 +59,2 @@
                -      child = first_child
                -      while child
                -        nextchild = child.next
                -        yield child
                -        child = nextchild
                -      end
                -    end
                +      opts = Config.process_options(options)
                +      plugins = Config.process_plugins(plugins)
                @@ -77,4 +62 @@
                -    # Deprecated: Please use `each` instead
                -    def each_child(&block)
                -      warn("[DEPRECATION] `each_child` is deprecated.  Please use `each` instead.")
                -      each(&block)
                +      node_to_commonmark(render: opts[:render], parse: opts[:parse], extension: opts[:extension], plugins: plugins).force_encoding("utf-8")
        lib/commonmarker/node/inspect.rb
                --- /tmp/d20260126-519-nw5cr1/commonmarker-0.23.10/lib/commonmarker/node/inspect.rb	2026-01-26 03:34:16.607531342 +0000
                +++ /tmp/d20260126-519-nw5cr1/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/node/inspect.rb	2026-01-26 03:34:16.733531301 +0000
                @@ -5 +5 @@
                -module CommonMarker
                +module Commonmarker
                @@ -19 +19,11 @@
                -          attrs = [:sourcepos, :string_content, :url, :title, :header_level, :list_type, :list_start, :list_tight, :fence_info].map do |name|
                +          attrs = [
                +            :source_position,
                +            :string_content,
                +            :url,
                +            :title,
                +            :header_level,
                +            :list_type,
                +            :list_start,
                +            :list_tight,
                +            :fence_info,
                +          ].filter_map do |name|
                @@ -21 +31 @@
                -          rescue NodeError
                +          rescue StandardError
                @@ -37 +47 @@
                -                node = node.next
                +                node = node.next_sibling
        lib/commonmarker/renderer.rb
                --- /tmp/d20260126-519-nw5cr1/commonmarker-0.23.10/lib/commonmarker/renderer.rb	2026-01-26 03:34:16.607531342 +0000
                +++ /tmp/d20260126-519-nw5cr1/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/renderer.rb	2026-01-26 03:34:16.734531300 +0000
                @@ -6 +6 @@
                -module CommonMarker
                +module Commonmarker
                @@ -8,126 +7,0 @@
                -    attr_accessor :in_tight, :warnings, :in_plain
                -
                -    def initialize(options: :DEFAULT, extensions: [])
                -      @opts = Config.process_options(options, :render)
                -      @stream = StringIO.new(+"")
                -      @need_blocksep = false
                -      @warnings = Set.new([])
                -      @in_tight = false
                -      @in_plain = false
                -      @tagfilter = extensions.include?(:tagfilter)
                -    end
                -
                -    def out(*args)
                -      args.each do |arg|
                -        case arg
                -        when :children
                -          @node.each { |child| out(child) }
                -        when Array
                -          arg.each { |x| render(x) }
                -        when Node
                -          render(arg)
                -        else
                -          @stream.write(arg)
                -        end
                -      end
                -    end
                -
                -    def render(node)
                -      @node = node
                -      if node.type == :document
                -        document(node)
                -        @stream.string
                -      elsif @in_plain && node.type != :text && node.type != :softbreak
                -        node.each { |child| render(child) }
                -      else
                -        begin
                -          send(node.type, node)
                -        rescue NoMethodError => e
                -          @warnings.add("WARNING: #{node.type} not implemented.")
                -          raise e
                -        end
                -      end
                -    end
                -
                -    def document(_node)
                -      out(:children)
                -    end
                -
                -    def code_block(node)
                -      code_block(node)
                -    end
                -
                -    def reference_def(_node); end
                -
                -    def cr
                -      return if @stream.string.empty? || @stream.string[-1] == "\n"
                -
                -      out("\n")
                -    end
                -
                -    def blocksep
                -      out("\n")
                -    end
                -
                -    def containersep
                -      cr unless @in_tight
                -    end
                -
                -    def block
                -      cr
                -      yield
                -      cr
                -    end
                -
                -    def container(starter, ender)
                -      out(starter)
                -      yield
                -      out(ender)
                -    end
                -
                -    def plain
                -      old_in_plain = @in_plain
                -      @in_plain = true
                -      yield
                -      @in_plain = old_in_plain
                -    end
                -
                -    private
                -
                -    def escape_href(str)
                -      @node.html_escape_href(str)
                -    end
                -
                -    def escape_html(str)
                -      @node.html_escape_html(str)
                -    end
                -
                -    def tagfilter(str)
                -      if @tagfilter
                -        str.gsub(
                -          %r{
                -            <
                -            (
                -            title|textarea|style|xmp|iframe|
                -            noembed|noframes|script|plaintext
                -            )
                -            (?=\s|>|/>)
                -          }xi,
                -          '&lt;\1',
                -        )
                -      else
                -        str
                -      end
                -    end
                -
                -    def sourcepos(node)
                -      return "" unless option_enabled?(:SOURCEPOS)
                -
                -      s = node.sourcepos
                -      " data-sourcepos=\"#{s[:start_line]}:#{s[:start_column]}-" \
                -        "#{s[:end_line]}:#{s[:end_column]}\""
                -    end
                -
                -    def option_enabled?(opt)
                -      (@opts & CommonMarker::Config::OPTS.dig(:render, opt)) != 0
                -    end
        lib/commonmarker/version.rb
                --- /tmp/d20260126-519-nw5cr1/commonmarker-0.23.10/lib/commonmarker/version.rb	2026-01-26 03:34:16.608531342 +0000
                +++ /tmp/d20260126-519-nw5cr1/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/version.rb	2026-01-26 03:34:16.734531300 +0000
                @@ -3,2 +3,2 @@
                -module CommonMarker
                -  VERSION = "0.23.10"
                +module Commonmarker
                +  VERSION = "2.6.3"

@github-actions
Copy link
Contributor

gem compare commonmarker 0.23.10 2.6.3

Compared versions: ["0.23.10", "2.6.3"]
  DIFFERENT bindir:
    0.23.10: bin
    2.6.3: exe
  DIFFERENT date:
    0.23.10: 2023-07-31 00:00:00 UTC
    2.6.3: 2026-01-23 00:00:00 UTC
  DIFFERENT description:
    0.23.10: A fast, safe, extensible parser for CommonMark. This wraps the official libcmark library.
    2.6.3: A fast, safe, extensible parser for CommonMark. This wraps the comrak Rust crate.
  DIFFERENT executables:
    0.23.10: ["commonmarker"]
    2.6.3: []
  DIFFERENT extensions:
    0.23.10: ["ext/commonmarker/extconf.rb"]
    2.6.3: []
  DIFFERENT metadata:
    0.23.10: {"rubygems_mfa_required" => "true"}
    2.6.3: {"allowed_push_host" => "https://rubygems.org", "funding_uri" => "https://github.com/sponsors/gjtorikian/", "source_code_uri" => "https://github.com/gjtorikian/commonmarker", "rubygems_mfa_required" => "true"}
  DIFFERENT platform:
    0.23.10: ruby
    2.6.3: x86_64-linux
  DIFFERENT rdoc_options:
    0.23.10: ["-x", "ext/commonmarker/cmark/.*"]
    2.6.3: []
  DIFFERENT require_paths:
    0.23.10: ["/opt/hostedtoolcache/Ruby/4.0.1/x64/lib/ruby/gems/4.0.0/extensions/x86_64-linux/4.0.0/commonmarker-0.23.10", "lib", "ext"]
    2.6.3: ["lib"]
  DIFFERENT required_ruby_version:
    0.23.10: >= 2.6, < 4.0
    2.6.3: >= 3.2, < 4.1.dev
  DIFFERENT required_rubygems_version:
    0.23.10: >= 0
    2.6.3: >= 3.4
  DIFFERENT rubygems_version:
    0.23.10: 3.3.26
    2.6.3: 3.5.23
  DIFFERENT summary:
    0.23.10: CommonMark parser and renderer. Written in C, wrapped in Ruby.
    2.6.3: CommonMark parser and renderer. Written in Rust, wrapped in Ruby.
  DIFFERENT version:
    0.23.10: 0.23.10
    2.6.3: 2.6.3
  DIFFERENT files:
    0.23.10->2.6.3:
      * Deleted:
            Rakefile
            bin/commonmarker
            commonmarker.gemspec
            ext/commonmarker/arena.c
            ext/commonmarker/autolink.c
            ext/commonmarker/autolink.h
            ext/commonmarker/blocks.c
            ext/commonmarker/buffer.c
            ext/commonmarker/buffer.h
            ext/commonmarker/case_fold_switch.inc
            ext/commonmarker/chunk.h
            ext/commonmarker/cmark-gfm-core-extensions.h
            ext/commonmarker/cmark-gfm-extension_api.h
            ext/commonmarker/cmark-gfm-extensions_export.h
            ext/commonmarker/cmark-gfm.h
            ext/commonmarker/cmark-gfm_export.h
            ext/commonmarker/cmark-gfm_version.h
            ext/commonmarker/cmark.c
            ext/commonmarker/cmark_ctype.c
            ext/commonmarker/cmark_ctype.h
            ext/commonmarker/commonmark.c
            ext/commonmarker/commonmarker.c
            ext/commonmarker/commonmarker.h
            ext/commonmarker/config.h
            ext/commonmarker/core-extensions.c
            ext/commonmarker/entities.inc
            ext/commonmarker/ext_scanners.c
            ext/commonmarker/ext_scanners.h
            ext/commonmarker/extconf.rb
            ext/commonmarker/footnotes.c
            ext/commonmarker/footnotes.h
            ext/commonmarker/houdini.h
            ext/commonmarker/houdini_href_e.c
            ext/commonmarker/houdini_html_e.c
            ext/commonmarker/houdini_html_u.c
            ext/commonmarker/html.c
            ext/commonmarker/html.h
            ext/commonmarker/inlines.c
            ext/commonmarker/inlines.h
            ext/commonmarker/iterator.c
            ext/commonmarker/iterator.h
            ext/commonmarker/latex.c
            ext/commonmarker/linked_list.c
            ext/commonmarker/man.c
            ext/commonmarker/map.c
            ext/commonmarker/map.h
            ext/commonmarker/node.c
            ext/commonmarker/node.h
            ext/commonmarker/parser.h
            ext/commonmarker/plaintext.c
            ext/commonmarker/plugin.c
            ext/commonmarker/plugin.h
            ext/commonmarker/references.c
            ext/commonmarker/references.h
            ext/commonmarker/registry.c
            ext/commonmarker/registry.h
            ext/commonmarker/render.c
            ext/commonmarker/render.h
            ext/commonmarker/scanners.c
            ext/commonmarker/scanners.h
            ext/commonmarker/scanners.re
            ext/commonmarker/strikethrough.c
            ext/commonmarker/strikethrough.h
            ext/commonmarker/syntax_extension.c
            ext/commonmarker/syntax_extension.h
            ext/commonmarker/table.c
            ext/commonmarker/table.h
            ext/commonmarker/tagfilter.c
            ext/commonmarker/tagfilter.h
            ext/commonmarker/tasklist.c
            ext/commonmarker/tasklist.h
            ext/commonmarker/utf8.c
            ext/commonmarker/utf8.h
            ext/commonmarker/xml.c
            lib/commonmarker/renderer/html_renderer.rb
      * Added:
            lib/commonmarker/3.2/commonmarker.so 
              (!) Unexpected permissions: 100755
              (!) File is executable
            lib/commonmarker/3.3/commonmarker.so 
              (!) Unexpected permissions: 100755
              (!) File is executable
            lib/commonmarker/3.4/commonmarker.so 
              (!) Unexpected permissions: 100755
              (!) File is executable
            lib/commonmarker/4.0/commonmarker.so 
              (!) Unexpected permissions: 100755
              (!) File is executable
            lib/commonmarker/constants.rb +7/-0
            lib/commonmarker/extension.rb +14/-0
            lib/commonmarker/node/ast.rb +8/-0
            lib/commonmarker/utils.rb +22/-0
      * Changed:
            README.md +245/-174
            lib/commonmarker.rb +27/-25
              (!) Shebang probably lost: #!/usr/bin/env ruby
            lib/commonmarker/config.rb +98/-40
            lib/commonmarker/node.rb +29/-47
            lib/commonmarker/node/inspect.rb +14/-4
            lib/commonmarker/renderer.rb +1/-127
            lib/commonmarker/version.rb +2/-2
  DIFFERENT development dependencies:
    0.23.10->2.6.3:
      * Deleted:
            awesome_print [">= 0"] (development)
            json ["~> 2.3"] (development)
            minitest ["~> 5.6"] (development)
            minitest-focus ["~> 1.1"] (development)
            rdoc ["~> 6.2"] (development)
            rubocop [">= 0"] (development)
            rubocop-standard [">= 0"] (development)
      * Updated:
            rake from: [">= 0"] to: ["~> 13.0"]
            rake-compiler from: ["~> 0.9"] to: ["~> 1.2"]

1 similar comment
@github-actions
Copy link
Contributor

gem compare commonmarker 0.23.10 2.6.3

Compared versions: ["0.23.10", "2.6.3"]
  DIFFERENT bindir:
    0.23.10: bin
    2.6.3: exe
  DIFFERENT date:
    0.23.10: 2023-07-31 00:00:00 UTC
    2.6.3: 2026-01-23 00:00:00 UTC
  DIFFERENT description:
    0.23.10: A fast, safe, extensible parser for CommonMark. This wraps the official libcmark library.
    2.6.3: A fast, safe, extensible parser for CommonMark. This wraps the comrak Rust crate.
  DIFFERENT executables:
    0.23.10: ["commonmarker"]
    2.6.3: []
  DIFFERENT extensions:
    0.23.10: ["ext/commonmarker/extconf.rb"]
    2.6.3: []
  DIFFERENT metadata:
    0.23.10: {"rubygems_mfa_required" => "true"}
    2.6.3: {"allowed_push_host" => "https://rubygems.org", "funding_uri" => "https://github.com/sponsors/gjtorikian/", "source_code_uri" => "https://github.com/gjtorikian/commonmarker", "rubygems_mfa_required" => "true"}
  DIFFERENT platform:
    0.23.10: ruby
    2.6.3: x86_64-linux
  DIFFERENT rdoc_options:
    0.23.10: ["-x", "ext/commonmarker/cmark/.*"]
    2.6.3: []
  DIFFERENT require_paths:
    0.23.10: ["/opt/hostedtoolcache/Ruby/4.0.1/x64/lib/ruby/gems/4.0.0/extensions/x86_64-linux/4.0.0/commonmarker-0.23.10", "lib", "ext"]
    2.6.3: ["lib"]
  DIFFERENT required_ruby_version:
    0.23.10: >= 2.6, < 4.0
    2.6.3: >= 3.2, < 4.1.dev
  DIFFERENT required_rubygems_version:
    0.23.10: >= 0
    2.6.3: >= 3.4
  DIFFERENT rubygems_version:
    0.23.10: 3.3.26
    2.6.3: 3.5.23
  DIFFERENT summary:
    0.23.10: CommonMark parser and renderer. Written in C, wrapped in Ruby.
    2.6.3: CommonMark parser and renderer. Written in Rust, wrapped in Ruby.
  DIFFERENT version:
    0.23.10: 0.23.10
    2.6.3: 2.6.3
  DIFFERENT files:
    0.23.10->2.6.3:
      * Deleted:
            Rakefile
            bin/commonmarker
            commonmarker.gemspec
            ext/commonmarker/arena.c
            ext/commonmarker/autolink.c
            ext/commonmarker/autolink.h
            ext/commonmarker/blocks.c
            ext/commonmarker/buffer.c
            ext/commonmarker/buffer.h
            ext/commonmarker/case_fold_switch.inc
            ext/commonmarker/chunk.h
            ext/commonmarker/cmark-gfm-core-extensions.h
            ext/commonmarker/cmark-gfm-extension_api.h
            ext/commonmarker/cmark-gfm-extensions_export.h
            ext/commonmarker/cmark-gfm.h
            ext/commonmarker/cmark-gfm_export.h
            ext/commonmarker/cmark-gfm_version.h
            ext/commonmarker/cmark.c
            ext/commonmarker/cmark_ctype.c
            ext/commonmarker/cmark_ctype.h
            ext/commonmarker/commonmark.c
            ext/commonmarker/commonmarker.c
            ext/commonmarker/commonmarker.h
            ext/commonmarker/config.h
            ext/commonmarker/core-extensions.c
            ext/commonmarker/entities.inc
            ext/commonmarker/ext_scanners.c
            ext/commonmarker/ext_scanners.h
            ext/commonmarker/extconf.rb
            ext/commonmarker/footnotes.c
            ext/commonmarker/footnotes.h
            ext/commonmarker/houdini.h
            ext/commonmarker/houdini_href_e.c
            ext/commonmarker/houdini_html_e.c
            ext/commonmarker/houdini_html_u.c
            ext/commonmarker/html.c
            ext/commonmarker/html.h
            ext/commonmarker/inlines.c
            ext/commonmarker/inlines.h
            ext/commonmarker/iterator.c
            ext/commonmarker/iterator.h
            ext/commonmarker/latex.c
            ext/commonmarker/linked_list.c
            ext/commonmarker/man.c
            ext/commonmarker/map.c
            ext/commonmarker/map.h
            ext/commonmarker/node.c
            ext/commonmarker/node.h
            ext/commonmarker/parser.h
            ext/commonmarker/plaintext.c
            ext/commonmarker/plugin.c
            ext/commonmarker/plugin.h
            ext/commonmarker/references.c
            ext/commonmarker/references.h
            ext/commonmarker/registry.c
            ext/commonmarker/registry.h
            ext/commonmarker/render.c
            ext/commonmarker/render.h
            ext/commonmarker/scanners.c
            ext/commonmarker/scanners.h
            ext/commonmarker/scanners.re
            ext/commonmarker/strikethrough.c
            ext/commonmarker/strikethrough.h
            ext/commonmarker/syntax_extension.c
            ext/commonmarker/syntax_extension.h
            ext/commonmarker/table.c
            ext/commonmarker/table.h
            ext/commonmarker/tagfilter.c
            ext/commonmarker/tagfilter.h
            ext/commonmarker/tasklist.c
            ext/commonmarker/tasklist.h
            ext/commonmarker/utf8.c
            ext/commonmarker/utf8.h
            ext/commonmarker/xml.c
            lib/commonmarker/renderer/html_renderer.rb
      * Added:
            lib/commonmarker/3.2/commonmarker.so 
              (!) Unexpected permissions: 100755
              (!) File is executable
            lib/commonmarker/3.3/commonmarker.so 
              (!) Unexpected permissions: 100755
              (!) File is executable
            lib/commonmarker/3.4/commonmarker.so 
              (!) Unexpected permissions: 100755
              (!) File is executable
            lib/commonmarker/4.0/commonmarker.so 
              (!) Unexpected permissions: 100755
              (!) File is executable
            lib/commonmarker/constants.rb +7/-0
            lib/commonmarker/extension.rb +14/-0
            lib/commonmarker/node/ast.rb +8/-0
            lib/commonmarker/utils.rb +22/-0
      * Changed:
            README.md +245/-174
            lib/commonmarker.rb +27/-25
              (!) Shebang probably lost: #!/usr/bin/env ruby
            lib/commonmarker/config.rb +98/-40
            lib/commonmarker/node.rb +29/-47
            lib/commonmarker/node/inspect.rb +14/-4
            lib/commonmarker/renderer.rb +1/-127
            lib/commonmarker/version.rb +2/-2
  DIFFERENT development dependencies:
    0.23.10->2.6.3:
      * Deleted:
            awesome_print [">= 0"] (development)
            json ["~> 2.3"] (development)
            minitest ["~> 5.6"] (development)
            minitest-focus ["~> 1.1"] (development)
            rdoc ["~> 6.2"] (development)
            rubocop [">= 0"] (development)
            rubocop-standard [">= 0"] (development)
      * Updated:
            rake from: [">= 0"] to: ["~> 13.0"]
            rake-compiler from: ["~> 0.9"] to: ["~> 1.2"]

@github-actions
Copy link
Contributor

gem compare --diff commonmarker 0.23.10 2.6.3

Compared versions: ["0.23.10", "2.6.3"]
  DIFFERENT files:
    0.23.10->2.6.3:
      * Deleted:
            Rakefile
            bin/commonmarker
            commonmarker.gemspec
            ext/commonmarker/arena.c
            ext/commonmarker/autolink.c
            ext/commonmarker/autolink.h
            ext/commonmarker/blocks.c
            ext/commonmarker/buffer.c
            ext/commonmarker/buffer.h
            ext/commonmarker/case_fold_switch.inc
            ext/commonmarker/chunk.h
            ext/commonmarker/cmark-gfm-core-extensions.h
            ext/commonmarker/cmark-gfm-extension_api.h
            ext/commonmarker/cmark-gfm-extensions_export.h
            ext/commonmarker/cmark-gfm.h
            ext/commonmarker/cmark-gfm_export.h
            ext/commonmarker/cmark-gfm_version.h
            ext/commonmarker/cmark.c
            ext/commonmarker/cmark_ctype.c
            ext/commonmarker/cmark_ctype.h
            ext/commonmarker/commonmark.c
            ext/commonmarker/commonmarker.c
            ext/commonmarker/commonmarker.h
            ext/commonmarker/config.h
            ext/commonmarker/core-extensions.c
            ext/commonmarker/entities.inc
            ext/commonmarker/ext_scanners.c
            ext/commonmarker/ext_scanners.h
            ext/commonmarker/extconf.rb
            ext/commonmarker/footnotes.c
            ext/commonmarker/footnotes.h
            ext/commonmarker/houdini.h
            ext/commonmarker/houdini_href_e.c
            ext/commonmarker/houdini_html_e.c
            ext/commonmarker/houdini_html_u.c
            ext/commonmarker/html.c
            ext/commonmarker/html.h
            ext/commonmarker/inlines.c
            ext/commonmarker/inlines.h
            ext/commonmarker/iterator.c
            ext/commonmarker/iterator.h
            ext/commonmarker/latex.c
            ext/commonmarker/linked_list.c
            ext/commonmarker/man.c
            ext/commonmarker/map.c
            ext/commonmarker/map.h
            ext/commonmarker/node.c
            ext/commonmarker/node.h
            ext/commonmarker/parser.h
            ext/commonmarker/plaintext.c
            ext/commonmarker/plugin.c
            ext/commonmarker/plugin.h
            ext/commonmarker/references.c
            ext/commonmarker/references.h
            ext/commonmarker/registry.c
            ext/commonmarker/registry.h
            ext/commonmarker/render.c
            ext/commonmarker/render.h
            ext/commonmarker/scanners.c
            ext/commonmarker/scanners.h
            ext/commonmarker/scanners.re
            ext/commonmarker/strikethrough.c
            ext/commonmarker/strikethrough.h
            ext/commonmarker/syntax_extension.c
            ext/commonmarker/syntax_extension.h
            ext/commonmarker/table.c
            ext/commonmarker/table.h
            ext/commonmarker/tagfilter.c
            ext/commonmarker/tagfilter.h
            ext/commonmarker/tasklist.c
            ext/commonmarker/tasklist.h
            ext/commonmarker/utf8.c
            ext/commonmarker/utf8.h
            ext/commonmarker/xml.c
            lib/commonmarker/renderer/html_renderer.rb
      * Added:
              (!) Unexpected permissions: 100755
              (!) File is executable
              (!) Unexpected permissions: 100755
              (!) File is executable
              (!) Unexpected permissions: 100755
              (!) File is executable
              (!) Unexpected permissions: 100755
              (!) File is executable
        lib/commonmarker/3.2/commonmarker.so
                Binary files /tmp/20260126-404-5a3ods and /tmp/d20260126-404-cazjww/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/3.2/commonmarker.so differ
        lib/commonmarker/3.3/commonmarker.so
                Binary files /tmp/20260126-404-pupemk and /tmp/d20260126-404-cazjww/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/3.3/commonmarker.so differ
        lib/commonmarker/3.4/commonmarker.so
                Binary files /tmp/20260126-404-l6kcx and /tmp/d20260126-404-cazjww/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/3.4/commonmarker.so differ
        lib/commonmarker/4.0/commonmarker.so
                Binary files /tmp/20260126-404-r5zf0h and /tmp/d20260126-404-cazjww/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/4.0/commonmarker.so differ
        lib/commonmarker/constants.rb
                --- /tmp/20260126-404-vkhpyk	2026-01-26 03:34:35.429601755 +0000
                +++ /tmp/d20260126-404-cazjww/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/constants.rb	2026-01-26 03:34:35.304601911 +0000
                @@ -0,0 +1,7 @@
                +# frozen_string_literal: true
                +
                +module Commonmarker
                +  module Constants
                +    BOOLS = [true, false].freeze
                +  end
                +end
        lib/commonmarker/extension.rb
                --- /tmp/20260126-404-m5i68s	2026-01-26 03:34:35.431601752 +0000
                +++ /tmp/d20260126-404-cazjww/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/extension.rb	2026-01-26 03:34:35.304601911 +0000
                @@ -0,0 +1,14 @@
                +# frozen_string_literal: true
                +
                +begin
                +  # native precompiled gems package shared libraries in <gem_dir>/lib/commonmarker/<ruby_version>
                +  # load the precompiled extension file
                +  ruby_version = /\d+\.\d+/.match(RUBY_VERSION)
                +  require_relative "#{ruby_version}/commonmarker"
                +rescue LoadError
                +  # fall back to the extension compiled upon installation.
                +  # use "require" instead of "require_relative" because non-native gems will place C extension files
                +  # in Gem::BasicSpecification#extension_dir after compilation (during normal installation), which
                +  # is in $LOAD_PATH but not necessarily relative to this file (see nokogiri#2300)
                +  require "commonmarker/commonmarker"
                +end
        lib/commonmarker/node/ast.rb
                --- /tmp/20260126-404-m86wj0	2026-01-26 03:34:35.432601751 +0000
                +++ /tmp/d20260126-404-cazjww/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/node/ast.rb	2026-01-26 03:34:35.304601911 +0000
                @@ -0,0 +1,8 @@
                +# frozen_string_literal: true
                +
                +module Commonmarker
                +  class Node
                +    class Ast
                +    end
                +  end
                +end
        lib/commonmarker/utils.rb
                --- /tmp/20260126-404-41619g	2026-01-26 03:34:35.433601750 +0000
                +++ /tmp/d20260126-404-cazjww/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/utils.rb	2026-01-26 03:34:35.304601911 +0000
                @@ -0,0 +1,22 @@
                +# frozen_string_literal: true
                +
                +require "commonmarker/constants"
                +
                +module Commonmarker
                +  module Utils
                +    include Commonmarker::Constants
                +
                +    def fetch_kv(options, key, value, type)
                +      value_klass = value.class
                +
                +      if Constants::BOOLS.include?(value) && BOOLS.include?(options[key])
                +        options[key]
                +      elsif options[key].is_a?(value_klass)
                +        options[key]
                +      else
                +        expected_type = Constants::BOOLS.include?(value) ? "Boolean" : value_klass.to_s
                +        raise TypeError, "#{type} option `:#{key}` must be #{expected_type}; got #{options[key].class}"
                +      end
                +    end
                +  end
                +end
      * Changed:
              (!) Shebang probably lost: #!/usr/bin/env ruby
        README.md
                --- /tmp/d20260126-404-cazjww/commonmarker-0.23.10/README.md	2026-01-26 03:34:35.129602131 +0000
                +++ /tmp/d20260126-404-cazjww/commonmarker-2.6.3-x86_64-linux/README.md	2026-01-26 03:34:35.194602049 +0000
                @@ -1 +1 @@
                -# CommonMarker
                +# Commonmarker
                @@ -3 +3 @@
                -![Build Status](https://github.com/gjtorikian/commonmarker/workflows/CI/badge.svg) [![Gem Version](https://badge.fury.io/rb/commonmarker.svg)](http://badge.fury.io/rb/commonmarker)
                +Ruby wrapper for Rust's [comrak](https://github.com/kivikakk/comrak) crate.
                @@ -5,2 +5 @@
                -Ruby wrapper for [libcmark-gfm](https://github.com/github/cmark),
                -GitHub's fork of the reference parser for CommonMark. It passes all of the C tests, 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.
                +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.
                @@ -8 +7,4 @@
                -For more information on available extensions, see [the documentation below](#extensions).
                +> [!NOTE]
                +> By default, several extensions not in any spec have been enabled, for the sake of end user convenience when generating HTML.
                +>
                +> For more information on the available options and extensions, see [the documentation below](#options-and-plugins).
                @@ -25,0 +28,2 @@
                +This gem expects to receive UTF-8 strings. Ensure your strings are the right encoding before passing them into `Commonmarker`.
                +
                @@ -28 +32 @@
                -Call `render_html` on a string to convert it to HTML:
                +Call `to_html` on a string to convert it to HTML:
                @@ -30 +34 @@
                -``` ruby
                +```ruby
                @@ -32,2 +36,4 @@
                -CommonMarker.render_html('Hi *there*', :DEFAULT)
                -# <p>Hi <em>there</em></p>\n
                +Commonmarker.to_html('"Hi *there*"', options: {
                +    parse: { smart: true }
                +})
                +# => <p>“Hi <em>there</em>”</p>\n
                @@ -36 +42 @@
                -The second argument is optional--[see below](#options) for more information.
                +(The second argument is optional--[see below](#options-and-plugins) for more information.)
                @@ -40 +46 @@
                -You can also parse a string to receive a `Document` node. You can then print that node to HTML, iterate over the children, and other fun node stuff. For example:
                +You can also parse a string to receive a `:document` node. You can then print that node to HTML, iterate over the children, and do other fun node stuff. For example:
                @@ -42 +48 @@
                -``` ruby
                +```ruby
                @@ -45,2 +51,4 @@
                -doc = CommonMarker.render_doc('*Hello* world', :DEFAULT)
                -puts(doc.to_html) # <p>Hi <em>there</em></p>\n
                +doc = Commonmarker.parse("*Hello* world", options: {
                +    parse: { smart: true }
                +})
                +puts(doc.to_html) # => <p><em>Hello</em> world</p>\n
                @@ -49 +57 @@
                -  puts node.type # [:document, :paragraph, :text, :emph, :text]
                +  puts node.type # => [:document, :paragraph, :emph, :text, :text]
                @@ -53 +61,27 @@
                -The second argument is optional--[see below](#options) for more information.
                +(The second argument is optional--[see below](#options-and-plugins) for more information.)
                +
                +When it comes to modifying the document, you can perform the following operations:
                +
                +- `insert_before`
                +- `insert_after`
                +- `prepend_child`
                +- `append_child`
                +- `delete`
                +
                +You can also get the source position of a node by calling `source_position`:
                +
                +```ruby
                +doc = Commonmarker.parse("*Hello* world")
                +puts doc.first_child.first_child.source_position
                +# => {:start_line=>1, :start_column=>1, :end_line=>1, :end_column=>7}
                +```
                +
                +You can also modify the following attributes:
                +
                +- `url`
                +- `title`
                +- `header_level`
                +- `list_type`
                +- `list_start`
                +- `list_tight`
                +- `fence_info`
                @@ -55 +89 @@
                -#### Example: walking the AST
                +#### Example: Walking the AST
                @@ -60 +94 @@
                -- `each` will iterate on a node and its children, but no further.
                +- `each` will iterate on a node's direct children, but no further.
                @@ -62 +96 @@
                -``` ruby
                +```ruby
                @@ -65,2 +99,2 @@
                -# parse the files specified on the command line
                -doc = CommonMarker.render_doc("# The site\n\n [GitHub](https://www.github.com)")
                +# parse some string
                +doc = Commonmarker.parse("# The site\n\n [GitHub](https://www.github.com)")
                @@ -74,11 +108 @@
                -
                -# Capitalize all regular text in headers
                -doc.walk do |node|
                -  if node.type == :header
                -    node.each do |subnode|
                -      if subnode.type == :text
                -        subnode.string_content = subnode.string_content.upcase
                -      end
                -    end
                -  end
                -end
                +# => URL = https://www.github.com
                @@ -92,0 +117 @@
                +# => <h1><a href=\"#the-site\"></a>The site</h1>\n<p>GitHub</p>\n
                @@ -95 +120 @@
                -### Creating a custom renderer
                +#### Example: Converting a document back into raw CommonMark
                @@ -97 +122 @@
                -You can also derive a class from CommonMarker's `HtmlRenderer` class. This produces slower output, but is far more customizable. For example:
                +You can use `to_commonmark` on a node to render it as raw text:
                @@ -99,6 +124,2 @@
                -``` ruby
                -class MyHtmlRenderer < CommonMarker::HtmlRenderer
                -  def initialize
                -    super
                -    @headerid = 1
                -  end
                +```ruby
                +require 'commonmarker'
                @@ -106,6 +127,8 @@
                -  def header(node)
                -    block do
                -      out("<h", node.header_level, " id=\"", @headerid, "\">",
                -               :children, "</h", node.header_level, ">")
                -      @headerid += 1
                -    end
                +# parse some string
                +doc = Commonmarker.parse("# The site\n\n [GitHub](https://www.github.com)")
                +
                +# Transform links to regular text
                +doc.walk do |node|
                +  if node.type == :link
                +    node.insert_before(node.first_child)
                +    node.delete
                @@ -115,7 +138,2 @@
                -myrenderer = MyHtmlRenderer.new
                -puts myrenderer.render(doc)
                -
                -# Print any warnings to STDERR
                -renderer.warnings.each do |w|
                -  STDERR.write("#{w}\n")
                -end
                +doc.to_commonmark
                +# => # The site\n\nGitHub\n
                @@ -124,16 +142 @@
                -## Options
                -
                -CommonMarker accepts the same options that CMark does, as symbols. Note that there is a distinction in CMark for "parse" options and "render" options, which are represented in the tables below.
                -
                -### Parse options
                -
                -| Name                          | Description
                -| ----------------------------- | -----------
                -| `:DEFAULT`                    | The default parsing system.
                -| `:SOURCEPOS`                  | Include source position in nodes
                -| `:UNSAFE`                     | Allow raw/custom HTML and unsafe links.
                -| `:VALIDATE_UTF8`              | Replace illegal sequences with the replacement character `U+FFFD`.
                -| `:SMART`                      | Use smart punctuation (curly quotes, etc.).
                -| `:LIBERAL_HTML_TAG`           | Support liberal parsing of inline HTML tags.
                -| `:FOOTNOTES`                  | Parse footnotes.
                -| `:STRIKETHROUGH_DOUBLE_TILDE` | Parse strikethroughs by double tildes (compatibility with [redcarpet](https://github.com/vmg/redcarpet))
                +## Options and plugins
                @@ -141,17 +144 @@
                -### Render options
                -
                -| Name                             | Description                                                     |
                -| ------------------               | -----------                                                     |
                -| `:DEFAULT`                       | The default rendering system.                                   |
                -| `:SOURCEPOS`                     | Include source position in rendered HTML.                       |
                -| `:HARDBREAKS`                    | Treat `\n` as hardbreaks (by adding `<br/>`).                   |
                -| `:UNSAFE`                        | Allow raw/custom HTML and unsafe links.                         |
                -| `:NOBREAKS`                      | Translate `\n` in the source to a single whitespace.            |
                -| `:VALIDATE_UTF8`                 | Replace illegal sequences with the replacement character `U+FFFD`. |
                -| `:SMART`                         | Use smart punctuation (curly quotes, etc.).                     |
                -| `:GITHUB_PRE_LANG`               | Use GitHub-style `<pre lang>` for fenced code blocks.           |
                -| `:LIBERAL_HTML_TAG`              | Support liberal parsing of inline HTML tags.                    |
                -| `:FOOTNOTES`                     | Render footnotes.                                               |
                -| `:STRIKETHROUGH_DOUBLE_TILDE`    | Parse strikethroughs by double tildes (compatibility with [redcarpet](https://github.com/vmg/redcarpet)) |
                -| `:TABLE_PREFER_STYLE_ATTRIBUTES` | Use `style` insted of `align` for table cells.                  |
                -| `:FULL_INFO_STRING`              | Include full info strings of code blocks in separate attribute. |
                +### Options
                @@ -159 +146 @@
                -### Passing options
                +Commonmarker accepts the same parse, render, and extensions options that comrak does, as a hash dictionary with symbol keys:
                @@ -161,11 +148,5 @@
                -To apply a single option, pass it in as a symbol argument:
                -
                -``` ruby
                -CommonMarker.render_doc("\"Hello,\" said the spider.", :SMART)
                -# <p>“Hello,” said the spider.</p>\n
                -```
                -
                -To have multiple options applied, pass in an array of symbols:
                -
                -``` ruby
                -CommonMarker.render_html("\"'Shelob' is my name.\"", [:HARDBREAKS, :SOURCEPOS])
                +```ruby
                +Commonmarker.to_html('"Hi *there*"', options:{
                +  parse: { smart: true },
                +  render: { hardbreaks: false}
                +})
                @@ -174 +155 @@
                -For more information on these options, see [the CMark documentation](https://git.io/v7nh1).
                +Note that there is a distinction in comrak for "parse" options and "render" options, which are represented in the tables below. As well, if you wish to disable any-non boolean option, pass in `nil`.
                @@ -176,5 +157 @@
                -## Extensions
                -
                -Both `render_html` and `render_doc` take an optional third argument defining the extensions you want enabled as your CommonMark document is being processed. The documentation for these extensions are [defined in this spec](https://github.github.com/gfm/), and the rationale is provided [in this blog post](https://githubengineering.com/a-formal-spec-for-github-markdown/).
                -
                -The available extensions are:
                +### Parse options
                @@ -182,5 +159,8 @@
                -* `:table` - This provides support for tables.
                -* `:tasklist` - This provides support for task list items.
                -* `:strikethrough` - This provides support for strikethroughs.
                -* `:autolink` - This provides support for automatically converting URLs to anchor tags.
                -* `:tagfilter` - This escapes [several "unsafe" HTML tags](https://github.github.com/gfm/#disallowed-raw-html-extension-), causing them to not have any effect.
                +| Name                         | Description                                                                                                                                 | Default |
                +| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
                +| `smart`                      | Punctuation (quotes, full-stops and hyphens) are converted into 'smart' punctuation.                                                        | `false` |
                +| `default_info_string`        | The default info string for fenced code blocks.                                                                                             | `""`    |
                +| `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` |
                +| `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` |
                +| `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` |
                +| `ignore_setext`              | Ignores setext-style headings.                                                                                                              | `false` |
                @@ -188,3 +168 @@
                -## Output formats
                -
                -Like CMark, CommonMarker can generate output in several formats: HTML, XML, plaintext, and commonmark are currently supported.
                +### Render options
                @@ -192 +170,14 @@
                -### HTML
                +| Name                 | Description                                                                                            | Default |
                +| -------------------- | ------------------------------------------------------------------------------------------------------ | ------- |
                +| `hardbreaks`         | [Soft line breaks](http://spec.commonmark.org/0.27/#soft-line-breaks) translate into hard line breaks. | `true`  |
                +| `github_pre_lang`    | GitHub-style `<pre lang="xyz">` is used for fenced code blocks with info tags.                         | `true`  |
                +| `full_info_string`   | Gives info string data after a space in a `data-meta` attribute on code blocks.                        | `false` |
                +| `width`              | The wrap column when outputting CommonMark.                                                            | `80`    |
                +| `unsafe`             | Allow rendering of raw HTML and potentially dangerous links.                                           | `false` |
                +| `escape`             | Escape raw HTML instead of clobbering it.                                                              | `false` |
                +| `sourcepos`          | Include source position attribute in HTML and XML output.                                              | `false` |
                +| `escaped_char_spans` | Wrap escaped characters in span tags.                                                                  | `true`  |
                +| `ignore_empty_links` | Ignores empty links, leaving the Markdown text in place.                                               | `false` |
                +| `gfm_quirks`         | Outputs HTML with GFM-style quirks; namely, not nesting `<strong>` inlines.                            | `false` |
                +| `prefer_fenced`      | Always output fenced code blocks, even where an indented one could be used.                            | `false` |
                +| `tasklist_classes`   | Add CSS classes to the HTML output of the tasklist extension                                           | `false` |
                @@ -194 +185 @@
                -The default output format, HTML, will be generated when calling `to_html` or using `--to=html` on the command line.
                +As well, there are several extensions which you can toggle in the same manner:
                @@ -197,2 +188,62 @@
                -doc = CommonMarker.render_doc('*Hello* world!', :DEFAULT)
                -puts(doc.to_html)
                +Commonmarker.to_html('"Hi *there*"', options: {
                +    extension: { footnotes: true, description_lists: true },
                +    render: { hardbreaks: false }
                +})
                +```
                +
                +### Extension options
                +
                +| Name                          | Description                                                                                                         | Default |
                +| ----------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------- |
                +| `strikethrough`               | Enables the [strikethrough extension](https://github.github.com/gfm/#strikethrough-extension-) from the GFM spec.   | `true`  |
                +| `tagfilter`                   | Enables the [tagfilter extension](https://github.github.com/gfm/#disallowed-raw-html-extension-) from the GFM spec. | `true`  |
                +| `table`                       | Enables the [table extension](https://github.github.com/gfm/#tables-extension-) from the GFM spec.                  | `true`  |
                +| `autolink`                    | Enables the [autolink extension](https://github.github.com/gfm/#autolinks-extension-) from the GFM spec.            | `true`  |
                +| `tasklist`                    | Enables the [task list extension](https://github.github.com/gfm/#task-list-items-extension-) from the GFM spec.     | `true`  |
                +| `superscript`                 | Enables the superscript Comrak extension.                                                                           | `false` |
                +| `header_ids`                  | Enables the header IDs Comrak extension. from the GFM spec.                                                         | `""`    |
                +| `footnotes`                   | Enables the footnotes extension per `cmark-gfm`.                                                                    | `false` |
                +| `inline_footnotes`            | Enables the inline footnotes extension.                                                                             | `false` |
                +| `description_lists`           | Enables the description lists extension.                                                                            | `false` |
                +| `front_matter_delimiter`      | Enables the front matter extension.                                                                                 | `""`    |
                +| `multiline_block_quotes`      | Enables the multiline block quotes extension.                                                                       | `false` |
                +| `math_dollars`, `math_code`   | Enables the math extension.                                                                                         | `false` |
                +| `shortcodes`                  | Enables the shortcodes extension.                                                                                   | `true`  |
                +| `wikilinks_title_before_pipe` | Enables the wikilinks extension, placing the title before the dividing pipe.                                        | `false` |
                +| `wikilinks_title_after_pipe`  | Enables the wikilinks extension, placing the title after the dividing pipe.                                         | `false` |
                +| `underline`                   | Enables the underline extension.                                                                                    | `false` |
                +| `spoiler`                     | Enables the spoiler extension.                                                                                      | `false` |
                +| `greentext`                   | Enables the greentext extension.                                                                                    | `false` |
                +| `subtext`                     | Enables the subtext extension.                                                                                      | `false` |
                +| `subscript`                   | Enables the subscript extension.                                                                                    | `false` |
                +| `alerts`                      | Enables the alerts extension.                                                                                       | `false` |
                +| `cjk_friendly_emphasis`       | Enables the [CJK friendly emphasis](https://github.com/tats-u/markdown-cjk-friendly) extension.                     | `false` |
                +| `highlight`                   | Enables highlighting via `==`                                                                                       | `false` |
                +
                +For more information on these options, see [the comrak documentation](https://github.com/kivikakk/comrak#usage).
                +
                +### Plugins
                +
                +In addition to the possibilities provided by generic CommonMark rendering, Commonmarker also supports plugins as a means of
                +providing further niceties.
                +
                +#### Syntax Highlighter Plugin
                +
                +The library comes with [a set of pre-existing themes](https://docs.rs/syntect/5.0.0/syntect/highlighting/struct.ThemeSet.html#implementations) for highlighting code:
                +
                +- `"base16-ocean.dark"`
                +- `"base16-eighties.dark"`
                +- `"base16-mocha.dark"`
                +- `"base16-ocean.light"`
                +- `"InspiredGitHub"`
                +- `"Solarized (dark)"`
                +- `"Solarized (light)"`
                +
                +````ruby
                +code = <<~CODE
                +  ```ruby
                +  def hello
                +    puts "hello"
                +  end
                +  ```
                +CODE
                @@ -200,2 +251,2 @@
                -<p><em>Hello</em> world!</p>
                -```
                +# pass in a theme name from a pre-existing set
                +puts Commonmarker.to_html(code, plugins: { syntax_highlighter: { theme: "InspiredGitHub" } })
                @@ -203 +254,20 @@
                -### XML
                +# <pre style="background-color:#ffffff;" lang="ruby"><code>
                +# <span style="font-weight:bold;color:#a71d5d;">def </span><span style="font-weight:bold;color:#795da3;">hello
                +# </span><span style="color:#62a35c;">puts </span><span style="color:#183691;">&quot;hello&quot;
                +# </span><span style="font-weight:bold;color:#a71d5d;">end
                +# </span>
                +# </code></pre>
                +````
                +
                +By default, the plugin uses the `"base16-ocean.dark"` theme to syntax highlight code.
                +
                +To disable this plugin, set the value to `nil`:
                +
                +````ruby
                +code = <<~CODE
                +  ```ruby
                +  def hello
                +    puts "hello"
                +  end
                +  ```
                +CODE
                @@ -205 +275 @@
                -XML will be generated when calling `to_xml` or using `--to=xml` on the command line.
                +Commonmarker.to_html(code, plugins: { syntax_highlighter: nil })
                @@ -207,3 +277,15 @@
                -```ruby
                -doc = CommonMarker.render_doc('*Hello* world!', :DEFAULT)
                -puts(doc.to_xml)
                +# <pre lang="ruby"><code>def hello
                +#   puts &quot;hello&quot;
                +# end
                +# </code></pre>
                +````
                +
                +To output CSS classes instead of `style` attributes, set the `theme` key to `""`:
                +
                +````ruby
                +code = <<~CODE
                +  ```ruby
                +  def hello
                +    puts "hello"
                +  end
                +CODE
                @@ -211,11 +293 @@
                -<?xml version="1.0" encoding="UTF-8"?>
                -<!DOCTYPE document SYSTEM "CommonMark.dtd">
                -<document xmlns="http://commonmark.org/xml/1.0">
                -  <paragraph>
                -    <emph>
                -      <text xml:space="preserve">Hello</text>
                -    </emph>
                -    <text xml:space="preserve"> world!</text>
                -  </paragraph>
                -</document>
                -```
                +Commonmarker.to_html(code, plugins: { syntax_highlighter: { theme: "" } })
                @@ -223 +295,4 @@
                -### Plaintext
                +# <pre class="syntax-highlighting"><code><span class="source ruby"><span class="meta function ruby"><span class="keyword control def ruby">def</span></span><span class="meta function ruby"> # <span class="entity name function ruby">hello</span></span>
                +#   <span class="support function builtin ruby">puts</span> <span class="string quoted double ruby"><span class="punctuation definition string begin ruby">&quot;</span>hello<span class="punctuation definition string end ruby">&quot;</span></span>
                +# <span class="keyword control ruby">end</span>\n</span></code></pre>
                +````
                @@ -225 +300 @@
                -Plaintext will be generated when calling `to_plaintext` or using `--to=plaintext` on the command line.
                +To use a custom theme, you can provide a `path` to a directory containing `.tmtheme` files to load:
                @@ -228,4 +303 @@
                -doc = CommonMarker.render_doc('*Hello* world!', :DEFAULT)
                -puts(doc.to_plaintext)
                -
                -Hello world!
                +Commonmarker.to_html(code, plugins: { syntax_highlighter: { theme: "Monokai", path: "./themes" } })
                @@ -234,11 +306 @@
                -### Commonmark
                -
                -Commonmark will be generated when calling `to_commonmark` or using `--to=commonmark` on the command line.
                -
                -``` ruby
                -text = <<-TEXT
                -1. I am a numeric list.
                -2. I continue the list.
                -* Suddenly, an unordered list!
                -* What fun!
                -TEXT
                +## Output formats
                @@ -246,2 +308 @@
                -doc = CommonMarker.render_doc(text, :DEFAULT)
                -puts(doc.to_commonmark)
                +Commonmarker can currently only generate output in one format: HTML.
                @@ -249,2 +310 @@
                -1.  I am a numeric list.
                -2.  I continue the list.
                +### HTML
                @@ -252 +312,2 @@
                -<!-- end list -->
                +```ruby
                +puts Commonmarker.to_html('*Hello* world!')
                @@ -254,2 +315 @@
                -  - Suddenly, an unordered list\!
                -  - What fun\!
                +# <p><em>Hello</em> world!</p>
                @@ -267 +327 @@
                -If there were no errors, you're done! Otherwise, make sure to follow the CMark dependency instructions.
                +If there were no errors, you're done! Otherwise, make sure to follow the comrak dependency instructions.
                @@ -271,2 +330,0 @@
                -Some rough benchmarks:
                -
                @@ -274,3 +332,2 @@
                -$ bundle exec rake benchmark
                -
                -input size = 11063727 bytes
                +❯ bundle exec rake benchmark
                +input size = 11064832 bytes
                @@ -278,10 +335,24 @@
                -redcarpet
                -  0.070000   0.020000   0.090000 (  0.079641)
                -github-markdown
                -  0.070000   0.010000   0.080000 (  0.083535)
                -commonmarker with to_html
                -  0.100000   0.010000   0.110000 (  0.111947)
                -commonmarker with ruby HtmlRenderer
                -  1.830000   0.030000   1.860000 (  1.866203)
                -kramdown
                -  4.610000   0.070000   4.680000 (  4.678398)
                +ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
                +Warming up --------------------------------------
                +  Markly.render_html     1.000 i/100ms
                +Markly::Node#to_html     1.000 i/100ms
                +Commonmarker.to_html     1.000 i/100ms
                +Commonmarker::Node.to_html
                +                         1.000 i/100ms
                +Kramdown::Document#to_html
                +                         1.000 i/100ms
                +Calculating -------------------------------------
                +  Markly.render_html     15.606 (±25.6%) i/s -     71.000 in   5.047132s
                +Markly::Node#to_html     15.692 (±25.5%) i/s -     72.000 in   5.095810s
                +Commonmarker.to_html      4.482 (± 0.0%) i/s -     23.000 in   5.137680s
                +Commonmarker::Node.to_html
                +                          5.092 (±19.6%) i/s -     25.000 in   5.072220s
                +Kramdown::Document#to_html
                +                          0.379 (± 0.0%) i/s -      2.000 in   5.277770s
                +
                +Comparison:
                +Markly::Node#to_html:       15.7 i/s
                +  Markly.render_html:       15.6 i/s - same-ish: difference falls within error
                +Commonmarker::Node.to_html:        5.1 i/s - 3.08x  slower
                +Commonmarker.to_html:        4.5 i/s - 3.50x  slower
                +Kramdown::Document#to_html:        0.4 i/s - 41.40x  slower
        lib/commonmarker.rb
                --- /tmp/d20260126-404-cazjww/commonmarker-0.23.10/lib/commonmarker.rb	2026-01-26 03:34:35.186602059 +0000
                +++ /tmp/d20260126-404-cazjww/commonmarker-2.6.3-x86_64-linux/lib/commonmarker.rb	2026-01-26 03:34:35.194602049 +0000
                @@ -1 +0,0 @@
                -#!/usr/bin/env ruby
                @@ -4,2 +3,3 @@
                -require "commonmarker/commonmarker"
                -require "commonmarker/config"
                +require_relative "commonmarker/extension"
                +
                +require "commonmarker/utils"
                @@ -6,0 +7 @@
                +require "commonmarker/config"
                @@ -8 +8,0 @@
                -require "commonmarker/renderer/html_renderer"
                @@ -11,4 +11 @@
                -begin
                -  require "awesome_print"
                -rescue LoadError; end # rubocop:disable Lint/SuppressedException
                -module CommonMarker
                +module Commonmarker
                @@ -16 +13 @@
                -    # Public:  Parses a Markdown string into an HTML string.
                +    # Public: Parses a CommonMark string into an HTML string.
                @@ -19,2 +16 @@
                -    # option - Either a {Symbol} or {Array of Symbol}s indicating the render options
                -    # extensions - An {Array of Symbol}s indicating the extensions to use
                +    # options - A {Hash} of render, parse, and extension options to transform the text.
                @@ -22,2 +18,2 @@
                -    # Returns a {String} of converted HTML.
                -    def render_html(text, options = :DEFAULT, extensions = [])
                +    # Returns the `parser` node.
                +    def parse(text, options: Commonmarker::Config::OPTIONS)
                @@ -24,0 +21,2 @@
                +      raise TypeError, "text must be UTF-8 encoded; got #{text.encoding}!" unless text.encoding.name == "UTF-8"
                +      raise TypeError, "options must be a Hash; got a #{options.class}!" unless options.is_a?(Hash)
                @@ -26,2 +24,3 @@
                -      opts = Config.process_options(options, :render)
                -      Node.markdown_to_html(text.encode("UTF-8"), opts, extensions)
                +      opts = Config.process_options(options)
                +
                +      commonmark_parse(text, parse: opts.fetch(:parse, {}), render: opts.fetch(:render, {}), extension: opts.fetch(:extension, {}))
                @@ -30 +29 @@
                -    # Public: Parses a Markdown string into a `document` node.
                +    # Public: Parses a CommonMark string into an HTML string.
                @@ -32,3 +31,3 @@
                -    # string - {String} to be parsed
                -    # option - A {Symbol} or {Array of Symbol}s indicating the parse options
                -    # extensions - An {Array of Symbol}s indicating the extensions to use
                +    # text - A {String} of text
                +    # options - A {Hash} of render, parse, and extension options to transform the text.
                +    # plugins - A {Hash} of additional plugins.
                @@ -36,2 +35,2 @@
                -    # Returns the `document` node.
                -    def render_doc(text, options = :DEFAULT, extensions = [])
                +    # Returns a {String} of converted HTML.
                +    def to_html(text, options: Commonmarker::Config::OPTIONS, plugins: Commonmarker::Config::PLUGINS)
                @@ -38,0 +38,5 @@
                +      raise TypeError, "text must be UTF-8 encoded; got #{text.encoding}!" unless text.encoding.name == "UTF-8"
                +      raise TypeError, "options must be a Hash; got a #{options.class}!" unless options.is_a?(Hash)
                +
                +      opts = Config.process_options(options)
                +      plugins = Config.process_plugins(plugins)
                @@ -40,3 +44 @@
                -      opts = Config.process_options(options, :parse)
                -      text = text.encode("UTF-8")
                -      Node.parse_document(text, text.bytesize, opts, extensions)
                +      commonmark_to_html(text, parse: opts.fetch(:parse, {}), render: opts.fetch(:render, {}), extension: opts.fetch(:extension, {}), plugins: plugins)
                @@ -44 +46 @@
                -end
                +  end
        lib/commonmarker/config.rb
                --- /tmp/d20260126-404-cazjww/commonmarker-0.23.10/lib/commonmarker/config.rb	2026-01-26 03:34:35.186602059 +0000
                +++ /tmp/d20260126-404-cazjww/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/config.rb	2026-01-26 03:34:35.304601911 +0000
                @@ -3,2 +3 @@
                -module CommonMarker
                -  # For Ruby::Enum, these must be classes, not modules
                +module Commonmarker
                @@ -6,2 +5,3 @@
                -    # See https://github.com/github/cmark-gfm/blob/master/src/cmark-gfm.h#L673
                -    OPTS = {
                +    # For details, see
                +    # https://github.com/kivikakk/comrak/blob/162ef9354deb2c9b4a4e05be495aa372ba5bb696/src/main.rs#L201
                +    OPTIONS = {
                @@ -9,8 +9,6 @@
                -        DEFAULT: 0,
                -        SOURCEPOS: (1 << 1),
                -        UNSAFE: (1 << 17),
                -        VALIDATE_UTF8: (1 << 9),
                -        SMART: (1 << 10),
                -        LIBERAL_HTML_TAG: (1 << 12),
                -        FOOTNOTES: (1 << 13),
                -        STRIKETHROUGH_DOUBLE_TILDE: (1 << 14),
                +        smart: false,
                +        default_info_string: "",
                +        relaxed_tasklist_matching: false,
                +        relaxed_autolinks: false,
                +        leave_footnote_definitions: false,
                +        ignore_setext: false,
                @@ -19,13 +17,12 @@
                -        DEFAULT: 0,
                -        SOURCEPOS: (1 << 1),
                -        HARDBREAKS: (1 << 2),
                -        UNSAFE: (1 << 17),
                -        NOBREAKS: (1 << 4),
                -        VALIDATE_UTF8: (1 << 9),
                -        SMART: (1 << 10),
                -        GITHUB_PRE_LANG: (1 << 11),
                -        LIBERAL_HTML_TAG: (1 << 12),
                -        FOOTNOTES: (1 << 13),
                -        STRIKETHROUGH_DOUBLE_TILDE: (1 << 14),
                -        TABLE_PREFER_STYLE_ATTRIBUTES: (1 << 15),
                -        FULL_INFO_STRING: (1 << 16),
                +        hardbreaks: true,
                +        github_pre_lang: true,
                +        full_info_string: false,
                +        width: 80,
                +        unsafe: false,
                +        escape: false,
                +        sourcepos: false,
                +        escaped_char_spans: true,
                +        ignore_empty_links: false,
                +        gfm_quirks: false,
                +        prefer_fenced: false,
                +        tasklist_classes: false,
                @@ -33 +30,28 @@
                -      format: [:html, :xml, :commonmark, :plaintext].freeze,
                +      extension: {
                +        strikethrough: true,
                +        tagfilter: true,
                +        table: true,
                +        autolink: true,
                +        tasklist: true,
                +        superscript: false,
                +        header_ids: "",
                +        footnotes: false,
                +        inline_footnotes: false,
                +        description_lists: false,
                +        front_matter_delimiter: "",
                +        multiline_block_quotes: false,
                +        math_dollars: false,
                +        math_code: false,
                +        shortcodes: true,
                +        wikilinks_title_before_pipe: false,
                +        wikilinks_title_after_pipe: false,
                +        underline: false,
                +        spoiler: false,
                +        greentext: false,
                +        subscript: false,
                +        subtext: false,
                +        alerts: false,
                +        cjk_friendly_emphasis: false,
                +        highlight: false,
                +      }.freeze,
                +      format: [:html].freeze,
                @@ -35,0 +60,7 @@
                +    PLUGINS = {
                +      syntax_highlighter: {
                +        theme: "base16-ocean.dark",
                +        path: "",
                +      },
                +    }
                +
                @@ -37,11 +68,31 @@
                -      def process_options(option, type)
                -        case option
                -        when Symbol
                -          OPTS.fetch(type).fetch(option)
                -        when Array
                -          raise TypeError if option.none?
                -
                -          # neckbearding around. the map will both check the opts and then bitwise-OR it
                -          OPTS.fetch(type).fetch_values(*option).inject(0, :|)
                -        else
                -          raise TypeError, "option type must be a valid symbol or array of symbols within the #{name}::OPTS[:#{type}] context"
                +      include Commonmarker::Utils
                +
                +      def process_options(options)
                +        {
                +          parse: process_parse_options(options[:parse].dup),
                +          render: process_render_options(options[:render].dup),
                +          extension: process_extension_options(options[:extension].dup),
                +        }
                +      end
                +
                +      def process_plugins(plugins)
                +        {
                +          syntax_highlighter: process_syntax_highlighter_plugin(plugins&.fetch(:syntax_highlighter, nil)),
                +        }
                +      end
                +    end
                +
                +    [:parse, :render, :extension].each do |type|
                +      define_singleton_method :"process_#{type}_options" do |options|
                +        Commonmarker::Config::OPTIONS[type].each_with_object({}) do |(key, value), hash|
                +          if options.nil? || !options.key?(key) # option not provided, use the default
                +            hash[key] = value
                +            next
                +          end
                +
                +          if options[key].nil? # # option explicitly not included, remove it
                +            options.delete(key)
                +            next
                +          end
                +
                +          hash[key] = fetch_kv(options, key, value, type)
                @@ -49,2 +99,0 @@
                -      rescue KeyError => e
                -        raise TypeError, "option ':#{e.key}' does not exist for #{name}::OPTS[:#{type}]"
                @@ -52 +101,10 @@
                -  end
                +    end
                +
                +    define_singleton_method :process_syntax_highlighter_plugin do |options|
                +      return if options.nil? # plugin explicitly nil, remove it
                +
                +      raise TypeError, "Expected a Hash for syntax_highlighter plugin, got #{options.class}" unless options.is_a?(Hash)
                +      raise TypeError, "Expected a Hash for syntax_highlighter plugin, got nothing" if options.empty?
                +
                +      Commonmarker::Config::PLUGINS[:syntax_highlighter].merge(options)
                +    end
        lib/commonmarker/node.rb
                --- /tmp/d20260126-404-cazjww/commonmarker-0.23.10/lib/commonmarker/node.rb	2026-01-26 03:34:35.186602059 +0000
                +++ /tmp/d20260126-404-cazjww/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/node.rb	2026-01-26 03:34:35.304601911 +0000
                @@ -2,0 +3 @@
                +require "commonmarker/node/ast"
                @@ -5 +6 @@
                -module CommonMarker
                +module Commonmarker
                @@ -22,10 +23,3 @@
                -    # Public: Convert the node to an HTML string.
                -    #
                -    # options - A {Symbol} or {Array of Symbol}s indicating the render options
                -    # extensions - An {Array of Symbol}s indicating the extensions to use
                -    #
                -    # Returns a {String}.
                -    def to_html(options = :DEFAULT, extensions = [])
                -      opts = Config.process_options(options, :render)
                -      _render_html(opts, extensions).force_encoding("utf-8")
                -    end
                +    # Public: Iterate over the children (if any) of the current pointer.
                +    def each
                +      return enum_for(:each) unless block_given?
                @@ -33,8 +27,6 @@
                -    # Public: Convert the node to an XML string.
                -    #
                -    # options - A {Symbol} or {Array of Symbol}s indicating the render options
                -    #
                -    # Returns a {String}.
                -    def to_xml(options = :DEFAULT)
                -      opts = Config.process_options(options, :render)
                -      _render_xml(opts).force_encoding("utf-8")
                +      child = first_child
                +      while child
                +        next_child = child.next_sibling
                +        yield child
                +        child = next_child
                +      end
                @@ -43 +35 @@
                -    # Public: Convert the node to a CommonMark string.
                +    # Public: Converts a node to an HTML string.
                @@ -45,2 +37,2 @@
                -    # options - A {Symbol} or {Array of Symbol}s indicating the render options
                -    # width - Column to wrap the output at
                +    # options - A {Hash} of render, parse, and extension options to transform the text.
                +    # plugins - A {Hash} of additional plugins.
                @@ -48,4 +40,8 @@
                -    # Returns a {String}.
                -    def to_commonmark(options = :DEFAULT, width = 120)
                -      opts = Config.process_options(options, :render)
                -      _render_commonmark(opts, width).force_encoding("utf-8")
                +    # Returns a {String} of HTML.
                +    def to_html(options: Commonmarker::Config::OPTIONS, plugins: Commonmarker::Config::PLUGINS)
                +      raise TypeError, "options must be a Hash; got a #{options.class}!" unless options.is_a?(Hash)
                +
                +      opts = Config.process_options(options)
                +      plugins = Config.process_plugins(plugins)
                +
                +      node_to_html(render: opts[:render], parse: opts[:parse], extension: opts[:extension], plugins: plugins).force_encoding("utf-8")
                @@ -54 +50 @@
                -    # Public: Convert the node to a plain text string.
                +    # Public: Convert the node to a CommonMark string.
                @@ -57 +53 @@
                -    # width - Column to wrap the output at
                +    # plugins - A {Hash} of additional plugins.
                @@ -60,8 +56,2 @@
                -    def to_plaintext(options = :DEFAULT, width = 120)
                -      opts = Config.process_options(options, :render)
                -      _render_plaintext(opts, width).force_encoding("utf-8")
                -    end
                -
                -    # Public: Iterate over the children (if any) of the current pointer.
                -    def each
                -      return enum_for(:each) unless block_given?
                +    def to_commonmark(options: Commonmarker::Config::OPTIONS, plugins: Commonmarker::Config::PLUGINS)
                +      raise TypeError, "options must be a Hash; got a #{options.class}!" unless options.is_a?(Hash)
                @@ -69,7 +59,2 @@
                -      child = first_child
                -      while child
                -        nextchild = child.next
                -        yield child
                -        child = nextchild
                -      end
                -    end
                +      opts = Config.process_options(options)
                +      plugins = Config.process_plugins(plugins)
                @@ -77,4 +62 @@
                -    # Deprecated: Please use `each` instead
                -    def each_child(&block)
                -      warn("[DEPRECATION] `each_child` is deprecated.  Please use `each` instead.")
                -      each(&block)
                +      node_to_commonmark(render: opts[:render], parse: opts[:parse], extension: opts[:extension], plugins: plugins).force_encoding("utf-8")
        lib/commonmarker/node/inspect.rb
                --- /tmp/d20260126-404-cazjww/commonmarker-0.23.10/lib/commonmarker/node/inspect.rb	2026-01-26 03:34:35.186602059 +0000
                +++ /tmp/d20260126-404-cazjww/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/node/inspect.rb	2026-01-26 03:34:35.304601911 +0000
                @@ -5 +5 @@
                -module CommonMarker
                +module Commonmarker
                @@ -19 +19,11 @@
                -          attrs = [:sourcepos, :string_content, :url, :title, :header_level, :list_type, :list_start, :list_tight, :fence_info].map do |name|
                +          attrs = [
                +            :source_position,
                +            :string_content,
                +            :url,
                +            :title,
                +            :header_level,
                +            :list_type,
                +            :list_start,
                +            :list_tight,
                +            :fence_info,
                +          ].filter_map do |name|
                @@ -21 +31 @@
                -          rescue NodeError
                +          rescue StandardError
                @@ -37 +47 @@
                -                node = node.next
                +                node = node.next_sibling
        lib/commonmarker/renderer.rb
                --- /tmp/d20260126-404-cazjww/commonmarker-0.23.10/lib/commonmarker/renderer.rb	2026-01-26 03:34:35.193602051 +0000
                +++ /tmp/d20260126-404-cazjww/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/renderer.rb	2026-01-26 03:34:35.304601911 +0000
                @@ -6 +6 @@
                -module CommonMarker
                +module Commonmarker
                @@ -8,126 +7,0 @@
                -    attr_accessor :in_tight, :warnings, :in_plain
                -
                -    def initialize(options: :DEFAULT, extensions: [])
                -      @opts = Config.process_options(options, :render)
                -      @stream = StringIO.new(+"")
                -      @need_blocksep = false
                -      @warnings = Set.new([])
                -      @in_tight = false
                -      @in_plain = false
                -      @tagfilter = extensions.include?(:tagfilter)
                -    end
                -
                -    def out(*args)
                -      args.each do |arg|
                -        case arg
                -        when :children
                -          @node.each { |child| out(child) }
                -        when Array
                -          arg.each { |x| render(x) }
                -        when Node
                -          render(arg)
                -        else
                -          @stream.write(arg)
                -        end
                -      end
                -    end
                -
                -    def render(node)
                -      @node = node
                -      if node.type == :document
                -        document(node)
                -        @stream.string
                -      elsif @in_plain && node.type != :text && node.type != :softbreak
                -        node.each { |child| render(child) }
                -      else
                -        begin
                -          send(node.type, node)
                -        rescue NoMethodError => e
                -          @warnings.add("WARNING: #{node.type} not implemented.")
                -          raise e
                -        end
                -      end
                -    end
                -
                -    def document(_node)
                -      out(:children)
                -    end
                -
                -    def code_block(node)
                -      code_block(node)
                -    end
                -
                -    def reference_def(_node); end
                -
                -    def cr
                -      return if @stream.string.empty? || @stream.string[-1] == "\n"
                -
                -      out("\n")
                -    end
                -
                -    def blocksep
                -      out("\n")
                -    end
                -
                -    def containersep
                -      cr unless @in_tight
                -    end
                -
                -    def block
                -      cr
                -      yield
                -      cr
                -    end
                -
                -    def container(starter, ender)
                -      out(starter)
                -      yield
                -      out(ender)
                -    end
                -
                -    def plain
                -      old_in_plain = @in_plain
                -      @in_plain = true
                -      yield
                -      @in_plain = old_in_plain
                -    end
                -
                -    private
                -
                -    def escape_href(str)
                -      @node.html_escape_href(str)
                -    end
                -
                -    def escape_html(str)
                -      @node.html_escape_html(str)
                -    end
                -
                -    def tagfilter(str)
                -      if @tagfilter
                -        str.gsub(
                -          %r{
                -            <
                -            (
                -            title|textarea|style|xmp|iframe|
                -            noembed|noframes|script|plaintext
                -            )
                -            (?=\s|>|/>)
                -          }xi,
                -          '&lt;\1',
                -        )
                -      else
                -        str
                -      end
                -    end
                -
                -    def sourcepos(node)
                -      return "" unless option_enabled?(:SOURCEPOS)
                -
                -      s = node.sourcepos
                -      " data-sourcepos=\"#{s[:start_line]}:#{s[:start_column]}-" \
                -        "#{s[:end_line]}:#{s[:end_column]}\""
                -    end
                -
                -    def option_enabled?(opt)
                -      (@opts & CommonMarker::Config::OPTS.dig(:render, opt)) != 0
                -    end
        lib/commonmarker/version.rb
                --- /tmp/d20260126-404-cazjww/commonmarker-0.23.10/lib/commonmarker/version.rb	2026-01-26 03:34:35.193602051 +0000
                +++ /tmp/d20260126-404-cazjww/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/version.rb	2026-01-26 03:34:35.305601910 +0000
                @@ -3,2 +3,2 @@
                -module CommonMarker
                -  VERSION = "0.23.10"
                +module Commonmarker
                +  VERSION = "2.6.3"

@github-actions
Copy link
Contributor

gem compare --diff commonmarker 0.23.10 2.6.3

Compared versions: ["0.23.10", "2.6.3"]
  DIFFERENT files:
    0.23.10->2.6.3:
      * Deleted:
            Rakefile
            bin/commonmarker
            commonmarker.gemspec
            ext/commonmarker/arena.c
            ext/commonmarker/autolink.c
            ext/commonmarker/autolink.h
            ext/commonmarker/blocks.c
            ext/commonmarker/buffer.c
            ext/commonmarker/buffer.h
            ext/commonmarker/case_fold_switch.inc
            ext/commonmarker/chunk.h
            ext/commonmarker/cmark-gfm-core-extensions.h
            ext/commonmarker/cmark-gfm-extension_api.h
            ext/commonmarker/cmark-gfm-extensions_export.h
            ext/commonmarker/cmark-gfm.h
            ext/commonmarker/cmark-gfm_export.h
            ext/commonmarker/cmark-gfm_version.h
            ext/commonmarker/cmark.c
            ext/commonmarker/cmark_ctype.c
            ext/commonmarker/cmark_ctype.h
            ext/commonmarker/commonmark.c
            ext/commonmarker/commonmarker.c
            ext/commonmarker/commonmarker.h
            ext/commonmarker/config.h
            ext/commonmarker/core-extensions.c
            ext/commonmarker/entities.inc
            ext/commonmarker/ext_scanners.c
            ext/commonmarker/ext_scanners.h
            ext/commonmarker/extconf.rb
            ext/commonmarker/footnotes.c
            ext/commonmarker/footnotes.h
            ext/commonmarker/houdini.h
            ext/commonmarker/houdini_href_e.c
            ext/commonmarker/houdini_html_e.c
            ext/commonmarker/houdini_html_u.c
            ext/commonmarker/html.c
            ext/commonmarker/html.h
            ext/commonmarker/inlines.c
            ext/commonmarker/inlines.h
            ext/commonmarker/iterator.c
            ext/commonmarker/iterator.h
            ext/commonmarker/latex.c
            ext/commonmarker/linked_list.c
            ext/commonmarker/man.c
            ext/commonmarker/map.c
            ext/commonmarker/map.h
            ext/commonmarker/node.c
            ext/commonmarker/node.h
            ext/commonmarker/parser.h
            ext/commonmarker/plaintext.c
            ext/commonmarker/plugin.c
            ext/commonmarker/plugin.h
            ext/commonmarker/references.c
            ext/commonmarker/references.h
            ext/commonmarker/registry.c
            ext/commonmarker/registry.h
            ext/commonmarker/render.c
            ext/commonmarker/render.h
            ext/commonmarker/scanners.c
            ext/commonmarker/scanners.h
            ext/commonmarker/scanners.re
            ext/commonmarker/strikethrough.c
            ext/commonmarker/strikethrough.h
            ext/commonmarker/syntax_extension.c
            ext/commonmarker/syntax_extension.h
            ext/commonmarker/table.c
            ext/commonmarker/table.h
            ext/commonmarker/tagfilter.c
            ext/commonmarker/tagfilter.h
            ext/commonmarker/tasklist.c
            ext/commonmarker/tasklist.h
            ext/commonmarker/utf8.c
            ext/commonmarker/utf8.h
            ext/commonmarker/xml.c
            lib/commonmarker/renderer/html_renderer.rb
      * Added:
              (!) Unexpected permissions: 100755
              (!) File is executable
              (!) Unexpected permissions: 100755
              (!) File is executable
              (!) Unexpected permissions: 100755
              (!) File is executable
              (!) Unexpected permissions: 100755
              (!) File is executable
        lib/commonmarker/3.2/commonmarker.so
                Binary files /tmp/20260126-489-1s26wb and /tmp/d20260126-489-btjetk/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/3.2/commonmarker.so differ
        lib/commonmarker/3.3/commonmarker.so
                Binary files /tmp/20260126-489-1zml9b and /tmp/d20260126-489-btjetk/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/3.3/commonmarker.so differ
        lib/commonmarker/3.4/commonmarker.so
                Binary files /tmp/20260126-489-w3mp6k and /tmp/d20260126-489-btjetk/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/3.4/commonmarker.so differ
        lib/commonmarker/4.0/commonmarker.so
                Binary files /tmp/20260126-489-vtoeri and /tmp/d20260126-489-btjetk/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/4.0/commonmarker.so differ
        lib/commonmarker/constants.rb
                --- /tmp/20260126-489-e84az6	2026-01-26 03:34:41.052827158 +0000
                +++ /tmp/d20260126-489-btjetk/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/constants.rb	2026-01-26 03:34:40.897829178 +0000
                @@ -0,0 +1,7 @@
                +# frozen_string_literal: true
                +
                +module Commonmarker
                +  module Constants
                +    BOOLS = [true, false].freeze
                +  end
                +end
        lib/commonmarker/extension.rb
                --- /tmp/20260126-489-ssc4yl	2026-01-26 03:34:41.054827132 +0000
                +++ /tmp/d20260126-489-btjetk/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/extension.rb	2026-01-26 03:34:40.897829178 +0000
                @@ -0,0 +1,14 @@
                +# frozen_string_literal: true
                +
                +begin
                +  # native precompiled gems package shared libraries in <gem_dir>/lib/commonmarker/<ruby_version>
                +  # load the precompiled extension file
                +  ruby_version = /\d+\.\d+/.match(RUBY_VERSION)
                +  require_relative "#{ruby_version}/commonmarker"
                +rescue LoadError
                +  # fall back to the extension compiled upon installation.
                +  # use "require" instead of "require_relative" because non-native gems will place C extension files
                +  # in Gem::BasicSpecification#extension_dir after compilation (during normal installation), which
                +  # is in $LOAD_PATH but not necessarily relative to this file (see nokogiri#2300)
                +  require "commonmarker/commonmarker"
                +end
        lib/commonmarker/node/ast.rb
                --- /tmp/20260126-489-petecx	2026-01-26 03:34:41.055827119 +0000
                +++ /tmp/d20260126-489-btjetk/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/node/ast.rb	2026-01-26 03:34:40.897829178 +0000
                @@ -0,0 +1,8 @@
                +# frozen_string_literal: true
                +
                +module Commonmarker
                +  class Node
                +    class Ast
                +    end
                +  end
                +end
        lib/commonmarker/utils.rb
                --- /tmp/20260126-489-i8c1qb	2026-01-26 03:34:41.056827106 +0000
                +++ /tmp/d20260126-489-btjetk/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/utils.rb	2026-01-26 03:34:40.897829178 +0000
                @@ -0,0 +1,22 @@
                +# frozen_string_literal: true
                +
                +require "commonmarker/constants"
                +
                +module Commonmarker
                +  module Utils
                +    include Commonmarker::Constants
                +
                +    def fetch_kv(options, key, value, type)
                +      value_klass = value.class
                +
                +      if Constants::BOOLS.include?(value) && BOOLS.include?(options[key])
                +        options[key]
                +      elsif options[key].is_a?(value_klass)
                +        options[key]
                +      else
                +        expected_type = Constants::BOOLS.include?(value) ? "Boolean" : value_klass.to_s
                +        raise TypeError, "#{type} option `:#{key}` must be #{expected_type}; got #{options[key].class}"
                +      end
                +    end
                +  end
                +end
      * Changed:
              (!) Shebang probably lost: #!/usr/bin/env ruby
        README.md
                --- /tmp/d20260126-489-btjetk/commonmarker-0.23.10/README.md	2026-01-26 03:34:40.715831549 +0000
                +++ /tmp/d20260126-489-btjetk/commonmarker-2.6.3-x86_64-linux/README.md	2026-01-26 03:34:40.763830924 +0000
                @@ -1 +1 @@
                -# CommonMarker
                +# Commonmarker
                @@ -3 +3 @@
                -![Build Status](https://github.com/gjtorikian/commonmarker/workflows/CI/badge.svg) [![Gem Version](https://badge.fury.io/rb/commonmarker.svg)](http://badge.fury.io/rb/commonmarker)
                +Ruby wrapper for Rust's [comrak](https://github.com/kivikakk/comrak) crate.
                @@ -5,2 +5 @@
                -Ruby wrapper for [libcmark-gfm](https://github.com/github/cmark),
                -GitHub's fork of the reference parser for CommonMark. It passes all of the C tests, 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.
                +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.
                @@ -8 +7,4 @@
                -For more information on available extensions, see [the documentation below](#extensions).
                +> [!NOTE]
                +> By default, several extensions not in any spec have been enabled, for the sake of end user convenience when generating HTML.
                +>
                +> For more information on the available options and extensions, see [the documentation below](#options-and-plugins).
                @@ -25,0 +28,2 @@
                +This gem expects to receive UTF-8 strings. Ensure your strings are the right encoding before passing them into `Commonmarker`.
                +
                @@ -28 +32 @@
                -Call `render_html` on a string to convert it to HTML:
                +Call `to_html` on a string to convert it to HTML:
                @@ -30 +34 @@
                -``` ruby
                +```ruby
                @@ -32,2 +36,4 @@
                -CommonMarker.render_html('Hi *there*', :DEFAULT)
                -# <p>Hi <em>there</em></p>\n
                +Commonmarker.to_html('"Hi *there*"', options: {
                +    parse: { smart: true }
                +})
                +# => <p>“Hi <em>there</em>”</p>\n
                @@ -36 +42 @@
                -The second argument is optional--[see below](#options) for more information.
                +(The second argument is optional--[see below](#options-and-plugins) for more information.)
                @@ -40 +46 @@
                -You can also parse a string to receive a `Document` node. You can then print that node to HTML, iterate over the children, and other fun node stuff. For example:
                +You can also parse a string to receive a `:document` node. You can then print that node to HTML, iterate over the children, and do other fun node stuff. For example:
                @@ -42 +48 @@
                -``` ruby
                +```ruby
                @@ -45,2 +51,4 @@
                -doc = CommonMarker.render_doc('*Hello* world', :DEFAULT)
                -puts(doc.to_html) # <p>Hi <em>there</em></p>\n
                +doc = Commonmarker.parse("*Hello* world", options: {
                +    parse: { smart: true }
                +})
                +puts(doc.to_html) # => <p><em>Hello</em> world</p>\n
                @@ -49 +57 @@
                -  puts node.type # [:document, :paragraph, :text, :emph, :text]
                +  puts node.type # => [:document, :paragraph, :emph, :text, :text]
                @@ -53 +61,27 @@
                -The second argument is optional--[see below](#options) for more information.
                +(The second argument is optional--[see below](#options-and-plugins) for more information.)
                +
                +When it comes to modifying the document, you can perform the following operations:
                +
                +- `insert_before`
                +- `insert_after`
                +- `prepend_child`
                +- `append_child`
                +- `delete`
                +
                +You can also get the source position of a node by calling `source_position`:
                +
                +```ruby
                +doc = Commonmarker.parse("*Hello* world")
                +puts doc.first_child.first_child.source_position
                +# => {:start_line=>1, :start_column=>1, :end_line=>1, :end_column=>7}
                +```
                +
                +You can also modify the following attributes:
                +
                +- `url`
                +- `title`
                +- `header_level`
                +- `list_type`
                +- `list_start`
                +- `list_tight`
                +- `fence_info`
                @@ -55 +89 @@
                -#### Example: walking the AST
                +#### Example: Walking the AST
                @@ -60 +94 @@
                -- `each` will iterate on a node and its children, but no further.
                +- `each` will iterate on a node's direct children, but no further.
                @@ -62 +96 @@
                -``` ruby
                +```ruby
                @@ -65,2 +99,2 @@
                -# parse the files specified on the command line
                -doc = CommonMarker.render_doc("# The site\n\n [GitHub](https://www.github.com)")
                +# parse some string
                +doc = Commonmarker.parse("# The site\n\n [GitHub](https://www.github.com)")
                @@ -74,11 +108 @@
                -
                -# Capitalize all regular text in headers
                -doc.walk do |node|
                -  if node.type == :header
                -    node.each do |subnode|
                -      if subnode.type == :text
                -        subnode.string_content = subnode.string_content.upcase
                -      end
                -    end
                -  end
                -end
                +# => URL = https://www.github.com
                @@ -92,0 +117 @@
                +# => <h1><a href=\"#the-site\"></a>The site</h1>\n<p>GitHub</p>\n
                @@ -95 +120 @@
                -### Creating a custom renderer
                +#### Example: Converting a document back into raw CommonMark
                @@ -97 +122 @@
                -You can also derive a class from CommonMarker's `HtmlRenderer` class. This produces slower output, but is far more customizable. For example:
                +You can use `to_commonmark` on a node to render it as raw text:
                @@ -99,6 +124,2 @@
                -``` ruby
                -class MyHtmlRenderer < CommonMarker::HtmlRenderer
                -  def initialize
                -    super
                -    @headerid = 1
                -  end
                +```ruby
                +require 'commonmarker'
                @@ -106,6 +127,8 @@
                -  def header(node)
                -    block do
                -      out("<h", node.header_level, " id=\"", @headerid, "\">",
                -               :children, "</h", node.header_level, ">")
                -      @headerid += 1
                -    end
                +# parse some string
                +doc = Commonmarker.parse("# The site\n\n [GitHub](https://www.github.com)")
                +
                +# Transform links to regular text
                +doc.walk do |node|
                +  if node.type == :link
                +    node.insert_before(node.first_child)
                +    node.delete
                @@ -115,7 +138,2 @@
                -myrenderer = MyHtmlRenderer.new
                -puts myrenderer.render(doc)
                -
                -# Print any warnings to STDERR
                -renderer.warnings.each do |w|
                -  STDERR.write("#{w}\n")
                -end
                +doc.to_commonmark
                +# => # The site\n\nGitHub\n
                @@ -124,16 +142 @@
                -## Options
                -
                -CommonMarker accepts the same options that CMark does, as symbols. Note that there is a distinction in CMark for "parse" options and "render" options, which are represented in the tables below.
                -
                -### Parse options
                -
                -| Name                          | Description
                -| ----------------------------- | -----------
                -| `:DEFAULT`                    | The default parsing system.
                -| `:SOURCEPOS`                  | Include source position in nodes
                -| `:UNSAFE`                     | Allow raw/custom HTML and unsafe links.
                -| `:VALIDATE_UTF8`              | Replace illegal sequences with the replacement character `U+FFFD`.
                -| `:SMART`                      | Use smart punctuation (curly quotes, etc.).
                -| `:LIBERAL_HTML_TAG`           | Support liberal parsing of inline HTML tags.
                -| `:FOOTNOTES`                  | Parse footnotes.
                -| `:STRIKETHROUGH_DOUBLE_TILDE` | Parse strikethroughs by double tildes (compatibility with [redcarpet](https://github.com/vmg/redcarpet))
                +## Options and plugins
                @@ -141,17 +144 @@
                -### Render options
                -
                -| Name                             | Description                                                     |
                -| ------------------               | -----------                                                     |
                -| `:DEFAULT`                       | The default rendering system.                                   |
                -| `:SOURCEPOS`                     | Include source position in rendered HTML.                       |
                -| `:HARDBREAKS`                    | Treat `\n` as hardbreaks (by adding `<br/>`).                   |
                -| `:UNSAFE`                        | Allow raw/custom HTML and unsafe links.                         |
                -| `:NOBREAKS`                      | Translate `\n` in the source to a single whitespace.            |
                -| `:VALIDATE_UTF8`                 | Replace illegal sequences with the replacement character `U+FFFD`. |
                -| `:SMART`                         | Use smart punctuation (curly quotes, etc.).                     |
                -| `:GITHUB_PRE_LANG`               | Use GitHub-style `<pre lang>` for fenced code blocks.           |
                -| `:LIBERAL_HTML_TAG`              | Support liberal parsing of inline HTML tags.                    |
                -| `:FOOTNOTES`                     | Render footnotes.                                               |
                -| `:STRIKETHROUGH_DOUBLE_TILDE`    | Parse strikethroughs by double tildes (compatibility with [redcarpet](https://github.com/vmg/redcarpet)) |
                -| `:TABLE_PREFER_STYLE_ATTRIBUTES` | Use `style` insted of `align` for table cells.                  |
                -| `:FULL_INFO_STRING`              | Include full info strings of code blocks in separate attribute. |
                +### Options
                @@ -159 +146 @@
                -### Passing options
                +Commonmarker accepts the same parse, render, and extensions options that comrak does, as a hash dictionary with symbol keys:
                @@ -161,11 +148,5 @@
                -To apply a single option, pass it in as a symbol argument:
                -
                -``` ruby
                -CommonMarker.render_doc("\"Hello,\" said the spider.", :SMART)
                -# <p>“Hello,” said the spider.</p>\n
                -```
                -
                -To have multiple options applied, pass in an array of symbols:
                -
                -``` ruby
                -CommonMarker.render_html("\"'Shelob' is my name.\"", [:HARDBREAKS, :SOURCEPOS])
                +```ruby
                +Commonmarker.to_html('"Hi *there*"', options:{
                +  parse: { smart: true },
                +  render: { hardbreaks: false}
                +})
                @@ -174 +155 @@
                -For more information on these options, see [the CMark documentation](https://git.io/v7nh1).
                +Note that there is a distinction in comrak for "parse" options and "render" options, which are represented in the tables below. As well, if you wish to disable any-non boolean option, pass in `nil`.
                @@ -176,5 +157 @@
                -## Extensions
                -
                -Both `render_html` and `render_doc` take an optional third argument defining the extensions you want enabled as your CommonMark document is being processed. The documentation for these extensions are [defined in this spec](https://github.github.com/gfm/), and the rationale is provided [in this blog post](https://githubengineering.com/a-formal-spec-for-github-markdown/).
                -
                -The available extensions are:
                +### Parse options
                @@ -182,5 +159,8 @@
                -* `:table` - This provides support for tables.
                -* `:tasklist` - This provides support for task list items.
                -* `:strikethrough` - This provides support for strikethroughs.
                -* `:autolink` - This provides support for automatically converting URLs to anchor tags.
                -* `:tagfilter` - This escapes [several "unsafe" HTML tags](https://github.github.com/gfm/#disallowed-raw-html-extension-), causing them to not have any effect.
                +| Name                         | Description                                                                                                                                 | Default |
                +| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
                +| `smart`                      | Punctuation (quotes, full-stops and hyphens) are converted into 'smart' punctuation.                                                        | `false` |
                +| `default_info_string`        | The default info string for fenced code blocks.                                                                                             | `""`    |
                +| `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` |
                +| `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` |
                +| `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` |
                +| `ignore_setext`              | Ignores setext-style headings.                                                                                                              | `false` |
                @@ -188,3 +168 @@
                -## Output formats
                -
                -Like CMark, CommonMarker can generate output in several formats: HTML, XML, plaintext, and commonmark are currently supported.
                +### Render options
                @@ -192 +170,14 @@
                -### HTML
                +| Name                 | Description                                                                                            | Default |
                +| -------------------- | ------------------------------------------------------------------------------------------------------ | ------- |
                +| `hardbreaks`         | [Soft line breaks](http://spec.commonmark.org/0.27/#soft-line-breaks) translate into hard line breaks. | `true`  |
                +| `github_pre_lang`    | GitHub-style `<pre lang="xyz">` is used for fenced code blocks with info tags.                         | `true`  |
                +| `full_info_string`   | Gives info string data after a space in a `data-meta` attribute on code blocks.                        | `false` |
                +| `width`              | The wrap column when outputting CommonMark.                                                            | `80`    |
                +| `unsafe`             | Allow rendering of raw HTML and potentially dangerous links.                                           | `false` |
                +| `escape`             | Escape raw HTML instead of clobbering it.                                                              | `false` |
                +| `sourcepos`          | Include source position attribute in HTML and XML output.                                              | `false` |
                +| `escaped_char_spans` | Wrap escaped characters in span tags.                                                                  | `true`  |
                +| `ignore_empty_links` | Ignores empty links, leaving the Markdown text in place.                                               | `false` |
                +| `gfm_quirks`         | Outputs HTML with GFM-style quirks; namely, not nesting `<strong>` inlines.                            | `false` |
                +| `prefer_fenced`      | Always output fenced code blocks, even where an indented one could be used.                            | `false` |
                +| `tasklist_classes`   | Add CSS classes to the HTML output of the tasklist extension                                           | `false` |
                @@ -194 +185 @@
                -The default output format, HTML, will be generated when calling `to_html` or using `--to=html` on the command line.
                +As well, there are several extensions which you can toggle in the same manner:
                @@ -197,2 +188,62 @@
                -doc = CommonMarker.render_doc('*Hello* world!', :DEFAULT)
                -puts(doc.to_html)
                +Commonmarker.to_html('"Hi *there*"', options: {
                +    extension: { footnotes: true, description_lists: true },
                +    render: { hardbreaks: false }
                +})
                +```
                +
                +### Extension options
                +
                +| Name                          | Description                                                                                                         | Default |
                +| ----------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------- |
                +| `strikethrough`               | Enables the [strikethrough extension](https://github.github.com/gfm/#strikethrough-extension-) from the GFM spec.   | `true`  |
                +| `tagfilter`                   | Enables the [tagfilter extension](https://github.github.com/gfm/#disallowed-raw-html-extension-) from the GFM spec. | `true`  |
                +| `table`                       | Enables the [table extension](https://github.github.com/gfm/#tables-extension-) from the GFM spec.                  | `true`  |
                +| `autolink`                    | Enables the [autolink extension](https://github.github.com/gfm/#autolinks-extension-) from the GFM spec.            | `true`  |
                +| `tasklist`                    | Enables the [task list extension](https://github.github.com/gfm/#task-list-items-extension-) from the GFM spec.     | `true`  |
                +| `superscript`                 | Enables the superscript Comrak extension.                                                                           | `false` |
                +| `header_ids`                  | Enables the header IDs Comrak extension. from the GFM spec.                                                         | `""`    |
                +| `footnotes`                   | Enables the footnotes extension per `cmark-gfm`.                                                                    | `false` |
                +| `inline_footnotes`            | Enables the inline footnotes extension.                                                                             | `false` |
                +| `description_lists`           | Enables the description lists extension.                                                                            | `false` |
                +| `front_matter_delimiter`      | Enables the front matter extension.                                                                                 | `""`    |
                +| `multiline_block_quotes`      | Enables the multiline block quotes extension.                                                                       | `false` |
                +| `math_dollars`, `math_code`   | Enables the math extension.                                                                                         | `false` |
                +| `shortcodes`                  | Enables the shortcodes extension.                                                                                   | `true`  |
                +| `wikilinks_title_before_pipe` | Enables the wikilinks extension, placing the title before the dividing pipe.                                        | `false` |
                +| `wikilinks_title_after_pipe`  | Enables the wikilinks extension, placing the title after the dividing pipe.                                         | `false` |
                +| `underline`                   | Enables the underline extension.                                                                                    | `false` |
                +| `spoiler`                     | Enables the spoiler extension.                                                                                      | `false` |
                +| `greentext`                   | Enables the greentext extension.                                                                                    | `false` |
                +| `subtext`                     | Enables the subtext extension.                                                                                      | `false` |
                +| `subscript`                   | Enables the subscript extension.                                                                                    | `false` |
                +| `alerts`                      | Enables the alerts extension.                                                                                       | `false` |
                +| `cjk_friendly_emphasis`       | Enables the [CJK friendly emphasis](https://github.com/tats-u/markdown-cjk-friendly) extension.                     | `false` |
                +| `highlight`                   | Enables highlighting via `==`                                                                                       | `false` |
                +
                +For more information on these options, see [the comrak documentation](https://github.com/kivikakk/comrak#usage).
                +
                +### Plugins
                +
                +In addition to the possibilities provided by generic CommonMark rendering, Commonmarker also supports plugins as a means of
                +providing further niceties.
                +
                +#### Syntax Highlighter Plugin
                +
                +The library comes with [a set of pre-existing themes](https://docs.rs/syntect/5.0.0/syntect/highlighting/struct.ThemeSet.html#implementations) for highlighting code:
                +
                +- `"base16-ocean.dark"`
                +- `"base16-eighties.dark"`
                +- `"base16-mocha.dark"`
                +- `"base16-ocean.light"`
                +- `"InspiredGitHub"`
                +- `"Solarized (dark)"`
                +- `"Solarized (light)"`
                +
                +````ruby
                +code = <<~CODE
                +  ```ruby
                +  def hello
                +    puts "hello"
                +  end
                +  ```
                +CODE
                @@ -200,2 +251,2 @@
                -<p><em>Hello</em> world!</p>
                -```
                +# pass in a theme name from a pre-existing set
                +puts Commonmarker.to_html(code, plugins: { syntax_highlighter: { theme: "InspiredGitHub" } })
                @@ -203 +254,20 @@
                -### XML
                +# <pre style="background-color:#ffffff;" lang="ruby"><code>
                +# <span style="font-weight:bold;color:#a71d5d;">def </span><span style="font-weight:bold;color:#795da3;">hello
                +# </span><span style="color:#62a35c;">puts </span><span style="color:#183691;">&quot;hello&quot;
                +# </span><span style="font-weight:bold;color:#a71d5d;">end
                +# </span>
                +# </code></pre>
                +````
                +
                +By default, the plugin uses the `"base16-ocean.dark"` theme to syntax highlight code.
                +
                +To disable this plugin, set the value to `nil`:
                +
                +````ruby
                +code = <<~CODE
                +  ```ruby
                +  def hello
                +    puts "hello"
                +  end
                +  ```
                +CODE
                @@ -205 +275 @@
                -XML will be generated when calling `to_xml` or using `--to=xml` on the command line.
                +Commonmarker.to_html(code, plugins: { syntax_highlighter: nil })
                @@ -207,3 +277,15 @@
                -```ruby
                -doc = CommonMarker.render_doc('*Hello* world!', :DEFAULT)
                -puts(doc.to_xml)
                +# <pre lang="ruby"><code>def hello
                +#   puts &quot;hello&quot;
                +# end
                +# </code></pre>
                +````
                +
                +To output CSS classes instead of `style` attributes, set the `theme` key to `""`:
                +
                +````ruby
                +code = <<~CODE
                +  ```ruby
                +  def hello
                +    puts "hello"
                +  end
                +CODE
                @@ -211,11 +293 @@
                -<?xml version="1.0" encoding="UTF-8"?>
                -<!DOCTYPE document SYSTEM "CommonMark.dtd">
                -<document xmlns="http://commonmark.org/xml/1.0">
                -  <paragraph>
                -    <emph>
                -      <text xml:space="preserve">Hello</text>
                -    </emph>
                -    <text xml:space="preserve"> world!</text>
                -  </paragraph>
                -</document>
                -```
                +Commonmarker.to_html(code, plugins: { syntax_highlighter: { theme: "" } })
                @@ -223 +295,4 @@
                -### Plaintext
                +# <pre class="syntax-highlighting"><code><span class="source ruby"><span class="meta function ruby"><span class="keyword control def ruby">def</span></span><span class="meta function ruby"> # <span class="entity name function ruby">hello</span></span>
                +#   <span class="support function builtin ruby">puts</span> <span class="string quoted double ruby"><span class="punctuation definition string begin ruby">&quot;</span>hello<span class="punctuation definition string end ruby">&quot;</span></span>
                +# <span class="keyword control ruby">end</span>\n</span></code></pre>
                +````
                @@ -225 +300 @@
                -Plaintext will be generated when calling `to_plaintext` or using `--to=plaintext` on the command line.
                +To use a custom theme, you can provide a `path` to a directory containing `.tmtheme` files to load:
                @@ -228,4 +303 @@
                -doc = CommonMarker.render_doc('*Hello* world!', :DEFAULT)
                -puts(doc.to_plaintext)
                -
                -Hello world!
                +Commonmarker.to_html(code, plugins: { syntax_highlighter: { theme: "Monokai", path: "./themes" } })
                @@ -234,11 +306 @@
                -### Commonmark
                -
                -Commonmark will be generated when calling `to_commonmark` or using `--to=commonmark` on the command line.
                -
                -``` ruby
                -text = <<-TEXT
                -1. I am a numeric list.
                -2. I continue the list.
                -* Suddenly, an unordered list!
                -* What fun!
                -TEXT
                +## Output formats
                @@ -246,2 +308 @@
                -doc = CommonMarker.render_doc(text, :DEFAULT)
                -puts(doc.to_commonmark)
                +Commonmarker can currently only generate output in one format: HTML.
                @@ -249,2 +310 @@
                -1.  I am a numeric list.
                -2.  I continue the list.
                +### HTML
                @@ -252 +312,2 @@
                -<!-- end list -->
                +```ruby
                +puts Commonmarker.to_html('*Hello* world!')
                @@ -254,2 +315 @@
                -  - Suddenly, an unordered list\!
                -  - What fun\!
                +# <p><em>Hello</em> world!</p>
                @@ -267 +327 @@
                -If there were no errors, you're done! Otherwise, make sure to follow the CMark dependency instructions.
                +If there were no errors, you're done! Otherwise, make sure to follow the comrak dependency instructions.
                @@ -271,2 +330,0 @@
                -Some rough benchmarks:
                -
                @@ -274,3 +332,2 @@
                -$ bundle exec rake benchmark
                -
                -input size = 11063727 bytes
                +❯ bundle exec rake benchmark
                +input size = 11064832 bytes
                @@ -278,10 +335,24 @@
                -redcarpet
                -  0.070000   0.020000   0.090000 (  0.079641)
                -github-markdown
                -  0.070000   0.010000   0.080000 (  0.083535)
                -commonmarker with to_html
                -  0.100000   0.010000   0.110000 (  0.111947)
                -commonmarker with ruby HtmlRenderer
                -  1.830000   0.030000   1.860000 (  1.866203)
                -kramdown
                -  4.610000   0.070000   4.680000 (  4.678398)
                +ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
                +Warming up --------------------------------------
                +  Markly.render_html     1.000 i/100ms
                +Markly::Node#to_html     1.000 i/100ms
                +Commonmarker.to_html     1.000 i/100ms
                +Commonmarker::Node.to_html
                +                         1.000 i/100ms
                +Kramdown::Document#to_html
                +                         1.000 i/100ms
                +Calculating -------------------------------------
                +  Markly.render_html     15.606 (±25.6%) i/s -     71.000 in   5.047132s
                +Markly::Node#to_html     15.692 (±25.5%) i/s -     72.000 in   5.095810s
                +Commonmarker.to_html      4.482 (± 0.0%) i/s -     23.000 in   5.137680s
                +Commonmarker::Node.to_html
                +                          5.092 (±19.6%) i/s -     25.000 in   5.072220s
                +Kramdown::Document#to_html
                +                          0.379 (± 0.0%) i/s -      2.000 in   5.277770s
                +
                +Comparison:
                +Markly::Node#to_html:       15.7 i/s
                +  Markly.render_html:       15.6 i/s - same-ish: difference falls within error
                +Commonmarker::Node.to_html:        5.1 i/s - 3.08x  slower
                +Commonmarker.to_html:        4.5 i/s - 3.50x  slower
                +Kramdown::Document#to_html:        0.4 i/s - 41.40x  slower
        lib/commonmarker.rb
                --- /tmp/d20260126-489-btjetk/commonmarker-0.23.10/lib/commonmarker.rb	2026-01-26 03:34:40.762830937 +0000
                +++ /tmp/d20260126-489-btjetk/commonmarker-2.6.3-x86_64-linux/lib/commonmarker.rb	2026-01-26 03:34:40.763830924 +0000
                @@ -1 +0,0 @@
                -#!/usr/bin/env ruby
                @@ -4,2 +3,3 @@
                -require "commonmarker/commonmarker"
                -require "commonmarker/config"
                +require_relative "commonmarker/extension"
                +
                +require "commonmarker/utils"
                @@ -6,0 +7 @@
                +require "commonmarker/config"
                @@ -8 +8,0 @@
                -require "commonmarker/renderer/html_renderer"
                @@ -11,4 +11 @@
                -begin
                -  require "awesome_print"
                -rescue LoadError; end # rubocop:disable Lint/SuppressedException
                -module CommonMarker
                +module Commonmarker
                @@ -16 +13 @@
                -    # Public:  Parses a Markdown string into an HTML string.
                +    # Public: Parses a CommonMark string into an HTML string.
                @@ -19,2 +16 @@
                -    # option - Either a {Symbol} or {Array of Symbol}s indicating the render options
                -    # extensions - An {Array of Symbol}s indicating the extensions to use
                +    # options - A {Hash} of render, parse, and extension options to transform the text.
                @@ -22,2 +18,2 @@
                -    # Returns a {String} of converted HTML.
                -    def render_html(text, options = :DEFAULT, extensions = [])
                +    # Returns the `parser` node.
                +    def parse(text, options: Commonmarker::Config::OPTIONS)
                @@ -24,0 +21,2 @@
                +      raise TypeError, "text must be UTF-8 encoded; got #{text.encoding}!" unless text.encoding.name == "UTF-8"
                +      raise TypeError, "options must be a Hash; got a #{options.class}!" unless options.is_a?(Hash)
                @@ -26,2 +24,3 @@
                -      opts = Config.process_options(options, :render)
                -      Node.markdown_to_html(text.encode("UTF-8"), opts, extensions)
                +      opts = Config.process_options(options)
                +
                +      commonmark_parse(text, parse: opts.fetch(:parse, {}), render: opts.fetch(:render, {}), extension: opts.fetch(:extension, {}))
                @@ -30 +29 @@
                -    # Public: Parses a Markdown string into a `document` node.
                +    # Public: Parses a CommonMark string into an HTML string.
                @@ -32,3 +31,3 @@
                -    # string - {String} to be parsed
                -    # option - A {Symbol} or {Array of Symbol}s indicating the parse options
                -    # extensions - An {Array of Symbol}s indicating the extensions to use
                +    # text - A {String} of text
                +    # options - A {Hash} of render, parse, and extension options to transform the text.
                +    # plugins - A {Hash} of additional plugins.
                @@ -36,2 +35,2 @@
                -    # Returns the `document` node.
                -    def render_doc(text, options = :DEFAULT, extensions = [])
                +    # Returns a {String} of converted HTML.
                +    def to_html(text, options: Commonmarker::Config::OPTIONS, plugins: Commonmarker::Config::PLUGINS)
                @@ -38,0 +38,5 @@
                +      raise TypeError, "text must be UTF-8 encoded; got #{text.encoding}!" unless text.encoding.name == "UTF-8"
                +      raise TypeError, "options must be a Hash; got a #{options.class}!" unless options.is_a?(Hash)
                +
                +      opts = Config.process_options(options)
                +      plugins = Config.process_plugins(plugins)
                @@ -40,3 +44 @@
                -      opts = Config.process_options(options, :parse)
                -      text = text.encode("UTF-8")
                -      Node.parse_document(text, text.bytesize, opts, extensions)
                +      commonmark_to_html(text, parse: opts.fetch(:parse, {}), render: opts.fetch(:render, {}), extension: opts.fetch(:extension, {}), plugins: plugins)
                @@ -44 +46 @@
                -end
                +  end
        lib/commonmarker/config.rb
                --- /tmp/d20260126-489-btjetk/commonmarker-0.23.10/lib/commonmarker/config.rb	2026-01-26 03:34:40.762830937 +0000
                +++ /tmp/d20260126-489-btjetk/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/config.rb	2026-01-26 03:34:40.897829178 +0000
                @@ -3,2 +3 @@
                -module CommonMarker
                -  # For Ruby::Enum, these must be classes, not modules
                +module Commonmarker
                @@ -6,2 +5,3 @@
                -    # See https://github.com/github/cmark-gfm/blob/master/src/cmark-gfm.h#L673
                -    OPTS = {
                +    # For details, see
                +    # https://github.com/kivikakk/comrak/blob/162ef9354deb2c9b4a4e05be495aa372ba5bb696/src/main.rs#L201
                +    OPTIONS = {
                @@ -9,8 +9,6 @@
                -        DEFAULT: 0,
                -        SOURCEPOS: (1 << 1),
                -        UNSAFE: (1 << 17),
                -        VALIDATE_UTF8: (1 << 9),
                -        SMART: (1 << 10),
                -        LIBERAL_HTML_TAG: (1 << 12),
                -        FOOTNOTES: (1 << 13),
                -        STRIKETHROUGH_DOUBLE_TILDE: (1 << 14),
                +        smart: false,
                +        default_info_string: "",
                +        relaxed_tasklist_matching: false,
                +        relaxed_autolinks: false,
                +        leave_footnote_definitions: false,
                +        ignore_setext: false,
                @@ -19,13 +17,12 @@
                -        DEFAULT: 0,
                -        SOURCEPOS: (1 << 1),
                -        HARDBREAKS: (1 << 2),
                -        UNSAFE: (1 << 17),
                -        NOBREAKS: (1 << 4),
                -        VALIDATE_UTF8: (1 << 9),
                -        SMART: (1 << 10),
                -        GITHUB_PRE_LANG: (1 << 11),
                -        LIBERAL_HTML_TAG: (1 << 12),
                -        FOOTNOTES: (1 << 13),
                -        STRIKETHROUGH_DOUBLE_TILDE: (1 << 14),
                -        TABLE_PREFER_STYLE_ATTRIBUTES: (1 << 15),
                -        FULL_INFO_STRING: (1 << 16),
                +        hardbreaks: true,
                +        github_pre_lang: true,
                +        full_info_string: false,
                +        width: 80,
                +        unsafe: false,
                +        escape: false,
                +        sourcepos: false,
                +        escaped_char_spans: true,
                +        ignore_empty_links: false,
                +        gfm_quirks: false,
                +        prefer_fenced: false,
                +        tasklist_classes: false,
                @@ -33 +30,28 @@
                -      format: [:html, :xml, :commonmark, :plaintext].freeze,
                +      extension: {
                +        strikethrough: true,
                +        tagfilter: true,
                +        table: true,
                +        autolink: true,
                +        tasklist: true,
                +        superscript: false,
                +        header_ids: "",
                +        footnotes: false,
                +        inline_footnotes: false,
                +        description_lists: false,
                +        front_matter_delimiter: "",
                +        multiline_block_quotes: false,
                +        math_dollars: false,
                +        math_code: false,
                +        shortcodes: true,
                +        wikilinks_title_before_pipe: false,
                +        wikilinks_title_after_pipe: false,
                +        underline: false,
                +        spoiler: false,
                +        greentext: false,
                +        subscript: false,
                +        subtext: false,
                +        alerts: false,
                +        cjk_friendly_emphasis: false,
                +        highlight: false,
                +      }.freeze,
                +      format: [:html].freeze,
                @@ -35,0 +60,7 @@
                +    PLUGINS = {
                +      syntax_highlighter: {
                +        theme: "base16-ocean.dark",
                +        path: "",
                +      },
                +    }
                +
                @@ -37,11 +68,31 @@
                -      def process_options(option, type)
                -        case option
                -        when Symbol
                -          OPTS.fetch(type).fetch(option)
                -        when Array
                -          raise TypeError if option.none?
                -
                -          # neckbearding around. the map will both check the opts and then bitwise-OR it
                -          OPTS.fetch(type).fetch_values(*option).inject(0, :|)
                -        else
                -          raise TypeError, "option type must be a valid symbol or array of symbols within the #{name}::OPTS[:#{type}] context"
                +      include Commonmarker::Utils
                +
                +      def process_options(options)
                +        {
                +          parse: process_parse_options(options[:parse].dup),
                +          render: process_render_options(options[:render].dup),
                +          extension: process_extension_options(options[:extension].dup),
                +        }
                +      end
                +
                +      def process_plugins(plugins)
                +        {
                +          syntax_highlighter: process_syntax_highlighter_plugin(plugins&.fetch(:syntax_highlighter, nil)),
                +        }
                +      end
                +    end
                +
                +    [:parse, :render, :extension].each do |type|
                +      define_singleton_method :"process_#{type}_options" do |options|
                +        Commonmarker::Config::OPTIONS[type].each_with_object({}) do |(key, value), hash|
                +          if options.nil? || !options.key?(key) # option not provided, use the default
                +            hash[key] = value
                +            next
                +          end
                +
                +          if options[key].nil? # # option explicitly not included, remove it
                +            options.delete(key)
                +            next
                +          end
                +
                +          hash[key] = fetch_kv(options, key, value, type)
                @@ -49,2 +99,0 @@
                -      rescue KeyError => e
                -        raise TypeError, "option ':#{e.key}' does not exist for #{name}::OPTS[:#{type}]"
                @@ -52 +101,10 @@
                -  end
                +    end
                +
                +    define_singleton_method :process_syntax_highlighter_plugin do |options|
                +      return if options.nil? # plugin explicitly nil, remove it
                +
                +      raise TypeError, "Expected a Hash for syntax_highlighter plugin, got #{options.class}" unless options.is_a?(Hash)
                +      raise TypeError, "Expected a Hash for syntax_highlighter plugin, got nothing" if options.empty?
                +
                +      Commonmarker::Config::PLUGINS[:syntax_highlighter].merge(options)
                +    end
        lib/commonmarker/node.rb
                --- /tmp/d20260126-489-btjetk/commonmarker-0.23.10/lib/commonmarker/node.rb	2026-01-26 03:34:40.762830937 +0000
                +++ /tmp/d20260126-489-btjetk/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/node.rb	2026-01-26 03:34:40.897829178 +0000
                @@ -2,0 +3 @@
                +require "commonmarker/node/ast"
                @@ -5 +6 @@
                -module CommonMarker
                +module Commonmarker
                @@ -22,10 +23,3 @@
                -    # Public: Convert the node to an HTML string.
                -    #
                -    # options - A {Symbol} or {Array of Symbol}s indicating the render options
                -    # extensions - An {Array of Symbol}s indicating the extensions to use
                -    #
                -    # Returns a {String}.
                -    def to_html(options = :DEFAULT, extensions = [])
                -      opts = Config.process_options(options, :render)
                -      _render_html(opts, extensions).force_encoding("utf-8")
                -    end
                +    # Public: Iterate over the children (if any) of the current pointer.
                +    def each
                +      return enum_for(:each) unless block_given?
                @@ -33,8 +27,6 @@
                -    # Public: Convert the node to an XML string.
                -    #
                -    # options - A {Symbol} or {Array of Symbol}s indicating the render options
                -    #
                -    # Returns a {String}.
                -    def to_xml(options = :DEFAULT)
                -      opts = Config.process_options(options, :render)
                -      _render_xml(opts).force_encoding("utf-8")
                +      child = first_child
                +      while child
                +        next_child = child.next_sibling
                +        yield child
                +        child = next_child
                +      end
                @@ -43 +35 @@
                -    # Public: Convert the node to a CommonMark string.
                +    # Public: Converts a node to an HTML string.
                @@ -45,2 +37,2 @@
                -    # options - A {Symbol} or {Array of Symbol}s indicating the render options
                -    # width - Column to wrap the output at
                +    # options - A {Hash} of render, parse, and extension options to transform the text.
                +    # plugins - A {Hash} of additional plugins.
                @@ -48,4 +40,8 @@
                -    # Returns a {String}.
                -    def to_commonmark(options = :DEFAULT, width = 120)
                -      opts = Config.process_options(options, :render)
                -      _render_commonmark(opts, width).force_encoding("utf-8")
                +    # Returns a {String} of HTML.
                +    def to_html(options: Commonmarker::Config::OPTIONS, plugins: Commonmarker::Config::PLUGINS)
                +      raise TypeError, "options must be a Hash; got a #{options.class}!" unless options.is_a?(Hash)
                +
                +      opts = Config.process_options(options)
                +      plugins = Config.process_plugins(plugins)
                +
                +      node_to_html(render: opts[:render], parse: opts[:parse], extension: opts[:extension], plugins: plugins).force_encoding("utf-8")
                @@ -54 +50 @@
                -    # Public: Convert the node to a plain text string.
                +    # Public: Convert the node to a CommonMark string.
                @@ -57 +53 @@
                -    # width - Column to wrap the output at
                +    # plugins - A {Hash} of additional plugins.
                @@ -60,8 +56,2 @@
                -    def to_plaintext(options = :DEFAULT, width = 120)
                -      opts = Config.process_options(options, :render)
                -      _render_plaintext(opts, width).force_encoding("utf-8")
                -    end
                -
                -    # Public: Iterate over the children (if any) of the current pointer.
                -    def each
                -      return enum_for(:each) unless block_given?
                +    def to_commonmark(options: Commonmarker::Config::OPTIONS, plugins: Commonmarker::Config::PLUGINS)
                +      raise TypeError, "options must be a Hash; got a #{options.class}!" unless options.is_a?(Hash)
                @@ -69,7 +59,2 @@
                -      child = first_child
                -      while child
                -        nextchild = child.next
                -        yield child
                -        child = nextchild
                -      end
                -    end
                +      opts = Config.process_options(options)
                +      plugins = Config.process_plugins(plugins)
                @@ -77,4 +62 @@
                -    # Deprecated: Please use `each` instead
                -    def each_child(&block)
                -      warn("[DEPRECATION] `each_child` is deprecated.  Please use `each` instead.")
                -      each(&block)
                +      node_to_commonmark(render: opts[:render], parse: opts[:parse], extension: opts[:extension], plugins: plugins).force_encoding("utf-8")
        lib/commonmarker/node/inspect.rb
                --- /tmp/d20260126-489-btjetk/commonmarker-0.23.10/lib/commonmarker/node/inspect.rb	2026-01-26 03:34:40.762830937 +0000
                +++ /tmp/d20260126-489-btjetk/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/node/inspect.rb	2026-01-26 03:34:40.897829178 +0000
                @@ -5 +5 @@
                -module CommonMarker
                +module Commonmarker
                @@ -19 +19,11 @@
                -          attrs = [:sourcepos, :string_content, :url, :title, :header_level, :list_type, :list_start, :list_tight, :fence_info].map do |name|
                +          attrs = [
                +            :source_position,
                +            :string_content,
                +            :url,
                +            :title,
                +            :header_level,
                +            :list_type,
                +            :list_start,
                +            :list_tight,
                +            :fence_info,
                +          ].filter_map do |name|
                @@ -21 +31 @@
                -          rescue NodeError
                +          rescue StandardError
                @@ -37 +47 @@
                -                node = node.next
                +                node = node.next_sibling
        lib/commonmarker/renderer.rb
                --- /tmp/d20260126-489-btjetk/commonmarker-0.23.10/lib/commonmarker/renderer.rb	2026-01-26 03:34:40.762830937 +0000
                +++ /tmp/d20260126-489-btjetk/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/renderer.rb	2026-01-26 03:34:40.897829178 +0000
                @@ -6 +6 @@
                -module CommonMarker
                +module Commonmarker
                @@ -8,126 +7,0 @@
                -    attr_accessor :in_tight, :warnings, :in_plain
                -
                -    def initialize(options: :DEFAULT, extensions: [])
                -      @opts = Config.process_options(options, :render)
                -      @stream = StringIO.new(+"")
                -      @need_blocksep = false
                -      @warnings = Set.new([])
                -      @in_tight = false
                -      @in_plain = false
                -      @tagfilter = extensions.include?(:tagfilter)
                -    end
                -
                -    def out(*args)
                -      args.each do |arg|
                -        case arg
                -        when :children
                -          @node.each { |child| out(child) }
                -        when Array
                -          arg.each { |x| render(x) }
                -        when Node
                -          render(arg)
                -        else
                -          @stream.write(arg)
                -        end
                -      end
                -    end
                -
                -    def render(node)
                -      @node = node
                -      if node.type == :document
                -        document(node)
                -        @stream.string
                -      elsif @in_plain && node.type != :text && node.type != :softbreak
                -        node.each { |child| render(child) }
                -      else
                -        begin
                -          send(node.type, node)
                -        rescue NoMethodError => e
                -          @warnings.add("WARNING: #{node.type} not implemented.")
                -          raise e
                -        end
                -      end
                -    end
                -
                -    def document(_node)
                -      out(:children)
                -    end
                -
                -    def code_block(node)
                -      code_block(node)
                -    end
                -
                -    def reference_def(_node); end
                -
                -    def cr
                -      return if @stream.string.empty? || @stream.string[-1] == "\n"
                -
                -      out("\n")
                -    end
                -
                -    def blocksep
                -      out("\n")
                -    end
                -
                -    def containersep
                -      cr unless @in_tight
                -    end
                -
                -    def block
                -      cr
                -      yield
                -      cr
                -    end
                -
                -    def container(starter, ender)
                -      out(starter)
                -      yield
                -      out(ender)
                -    end
                -
                -    def plain
                -      old_in_plain = @in_plain
                -      @in_plain = true
                -      yield
                -      @in_plain = old_in_plain
                -    end
                -
                -    private
                -
                -    def escape_href(str)
                -      @node.html_escape_href(str)
                -    end
                -
                -    def escape_html(str)
                -      @node.html_escape_html(str)
                -    end
                -
                -    def tagfilter(str)
                -      if @tagfilter
                -        str.gsub(
                -          %r{
                -            <
                -            (
                -            title|textarea|style|xmp|iframe|
                -            noembed|noframes|script|plaintext
                -            )
                -            (?=\s|>|/>)
                -          }xi,
                -          '&lt;\1',
                -        )
                -      else
                -        str
                -      end
                -    end
                -
                -    def sourcepos(node)
                -      return "" unless option_enabled?(:SOURCEPOS)
                -
                -      s = node.sourcepos
                -      " data-sourcepos=\"#{s[:start_line]}:#{s[:start_column]}-" \
                -        "#{s[:end_line]}:#{s[:end_column]}\""
                -    end
                -
                -    def option_enabled?(opt)
                -      (@opts & CommonMarker::Config::OPTS.dig(:render, opt)) != 0
                -    end
        lib/commonmarker/version.rb
                --- /tmp/d20260126-489-btjetk/commonmarker-0.23.10/lib/commonmarker/version.rb	2026-01-26 03:34:40.762830937 +0000
                +++ /tmp/d20260126-489-btjetk/commonmarker-2.6.3-x86_64-linux/lib/commonmarker/version.rb	2026-01-26 03:34:40.897829178 +0000
                @@ -3,2 +3,2 @@
                -module CommonMarker
                -  VERSION = "0.23.10"
                +module Commonmarker
                +  VERSION = "2.6.3"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies ruby Pull requests that update Ruby code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants