Skip to content

chore(deps): bump commonmarker from v0.18.3 to v2.8.2#2059

Merged
zkoppert merged 2 commits into
masterfrom
dependabot/bundler/commonmarker-v2.8.2
Jun 8, 2026
Merged

chore(deps): bump commonmarker from v0.18.3 to v2.8.2#2059
zkoppert merged 2 commits into
masterfrom
dependabot/bundler/commonmarker-v2.8.2

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github May 13, 2026

Copy link
Copy Markdown
Contributor

Bumps commonmarker from v0.18.3 to v2.8.2.

Release notes

Sourced from commonmarker's releases.

v2.8.2

What's Changed

Full Changelog: gjtorikian/commonmarker@v2.8.1...v2.8.2

Changelog

Sourced from commonmarker's changelog.

[v2.8.2] - 09-05-2026

What's Changed

Full Changelog: gjtorikian/commonmarker@v2.8.1...v2.8.2

[v2.8.1] - 14-04-2026

What's Changed

Full Changelog: gjtorikian/commonmarker@v2.8.0...v2.8.1

[v2.8.0] - 12-04-2026

What's Changed

New Contributors

Full Changelog: gjtorikian/commonmarker@v2.7.0...v2.8.0

[v2.7.0] - 14-03-2026

What's Changed

New Contributors

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

[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

... (truncated)

Commits
  • 958a139 Merge pull request #462 from gjtorikian/release/v2.8.2
  • 54acd71 [skip test] update changelog
  • 0898c4c Merge pull request #461 from gjtorikian/bump-version-for-alert
  • 6df2bac release for 2.8.2
  • d96a850 Merge pull request #460 from fukayatsu/add-alert-type-getter
  • d935437 Add alert_type accessors for alert nodes
  • 98eda97 Merge pull request #459 from gjtorikian/dependabot/cargo/rb-sys-0.9.127
  • 69a13de Bump rb-sys from 0.9.126 to 0.9.127
  • 31016cf Merge pull request #457 from gjtorikian/release/v2.8.1
  • 8087370 [skip test] update changelog
  • Additional commits viewable in compare view

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code labels May 13, 2026
@zkoppert

Copy link
Copy Markdown
Member

@dependabot rebase

@dependabot dependabot Bot force-pushed the dependabot/bundler/commonmarker-v2.8.2 branch 3 times, most recently from f3950f9 to 655213a Compare May 14, 2026 08:24
@suacasataqui

This comment was marked as spam.

@github github deleted a comment from suacasataqui Jun 6, 2026
@dependabot dependabot Bot force-pushed the dependabot/bundler/commonmarker-v2.8.2 branch from 655213a to acb82c6 Compare June 6, 2026 16:17
zkoppert added a commit that referenced this pull request Jun 8, 2026
Commonmarker 2.x is a from-scratch rewrite that swaps the upstream parser
from cmark-gfm (C) to comrak (Rust). It also redesigns the Ruby API:

  - Module: CommonMarker -> Commonmarker (lowercase m)
  - Render entry point: CommonMarker.render_html(content, opts, exts)
    -> Commonmarker.to_html(content, options: {parse:, render:, extension:})
  - Symbol arrays of opts/exts -> nested option hashes with snake_case keys
  - :FOOTNOTES moved from a parse opt to an extension
  - A bundled syntax highlighter plugin is enabled by default

The migration preserves the legacy public contract: callers can still pass
`commonmarker_opts:` and `commonmarker_exts:` as symbol arrays. The wrapper
translates each legacy symbol into the new nested hash structure.

Several behaviors had to be pinned explicitly to preserve cmark-gfm 0.x
output:

  - hardbreaks defaults to true in 2.x; set false to match cmark.
  - tagfilter, autolink, table, strikethrough, tasklist, and shortcodes
    are extensions that default to on in 2.x but were strictly opt-in in
    0.x; explicitly disable any the caller did not request.
  - header_ids is on by default in 2.x and injects an empty anchor inside
    every heading; explicitly disable it unless the caller requested it.
  - The syntax_highlighter plugin is disabled (plugins: {syntax_highlighter: nil})
    to keep `<pre lang>` blocks clean.

Closes #2059

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Zack Koppert <zkoppert@github.com>
@zkoppert zkoppert force-pushed the dependabot/bundler/commonmarker-v2.8.2 branch from acb82c6 to 6ee7140 Compare June 8, 2026 04:47
@zkoppert zkoppert requested a review from Copilot June 8, 2026 04:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Markdown rendering dependency from the legacy commonmarker 0.x (cmark-gfm) API to commonmarker 2.x (comrak-backed), adjusting the renderer wrapper to preserve the existing option/extension contract while moving to the published Rubygems release.

Changes:

  • Bump commonmarker from v0.18.3 (git tag) to ~> 2.8.2 (Rubygems) and refresh Gemfile.lock.
  • Rewrite the commonmarker renderer adapter to translate legacy commonmarker_opts/commonmarker_exts into the 2.x Commonmarker.to_html options/plugins structure.
  • Explicitly disable 2.x default-enabled extensions/plugins (e.g., syntax highlighter, header IDs, several extensions) unless callers request them, to better match 0.x behavior.
Show a summary per file
File Description
lib/github/markup/markdown.rb Adapts legacy CommonMarker 0.x options/extensions to Commonmarker 2.x to_html API while attempting to preserve prior defaults.
Gemfile Switches commonmarker dependency from a git tag to the released ~> 2.8.2 gem.
Gemfile.lock Updates locked dependencies for the new commonmarker and its transitive deps/platform variants.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/3 changed files
  • Comments generated: 0

Commonmarker 2.x is a from-scratch rewrite that swaps the upstream parser
from cmark-gfm (C) to comrak (Rust). It also redesigns the Ruby API:

  - Module: CommonMarker -> Commonmarker (lowercase m)
  - Render entry point: CommonMarker.render_html(content, opts, exts)
    -> Commonmarker.to_html(content, options: {parse:, render:, extension:})
  - Symbol arrays of opts/exts -> nested option hashes with snake_case keys
  - :FOOTNOTES moved from a parse opt to an extension
  - A bundled syntax highlighter plugin is enabled by default

The migration preserves the legacy public contract: callers can still pass
`commonmarker_opts:` and `commonmarker_exts:` as symbol arrays. The wrapper
translates each legacy symbol into the new nested hash structure.

Several behaviors had to be pinned explicitly to preserve cmark-gfm 0.x
output:

  - hardbreaks defaults to true in 2.x; set false to match cmark.
  - tagfilter, autolink, table, strikethrough, tasklist, and shortcodes
    are extensions that default to on in 2.x but were strictly opt-in in
    0.x; explicitly disable any the caller did not request.
  - header_ids is on by default in 2.x and injects an empty anchor inside
    every heading; explicitly disable it unless the caller requested it.
  - The syntax_highlighter plugin is disabled (plugins: {syntax_highlighter: nil})
    to keep `<pre lang>` blocks clean.

Closes #2059

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Zack Koppert <zkoppert@github.com>
@zkoppert zkoppert force-pushed the dependabot/bundler/commonmarker-v2.8.2 branch from 6ee7140 to b41ed92 Compare June 8, 2026 07:00
PR #2072 enforces a 100% line+branch coverage floor. The commonmarker
2.x migration adds a legacy options shim (lib/github/markup/markdown.rb
lines 30-69) that translates the cmark-gfm 0.x :SOURCEPOS / :HARDBREAKS
/ etc. symbols into commonmarker 2.x parse/render/extension option
hashes; none of the new branches were exercised by the existing suite.

Each new test stubs the Commonmarker constant via the existing
with_stub_const helper, invokes the MARKDOWN_GEMS["commonmarker"]
proc with a single legacy option (or extension), and asserts the
expected key/value lands in the captured options. This covers every
when-branch in the two case statements plus the unknown-option /
unknown-extension ArgumentError paths.

After this change: 62 runs, 136 assertions, 0 failures.
Line Coverage: 100.0% (226 / 226).
Branch Coverage: 100.0% (55 / 55).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Zack Koppert <zkoppert@github.com>
GitHub Advanced Security started work on behalf of zkoppert June 8, 2026 18:01 View session
GitHub Advanced Security finished work on behalf of zkoppert June 8, 2026 18:02
@zkoppert zkoppert self-assigned this Jun 8, 2026
@zkoppert zkoppert merged commit 8a31006 into master Jun 8, 2026
11 checks passed
@zkoppert zkoppert deleted the dependabot/bundler/commonmarker-v2.8.2 branch June 8, 2026 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants