Skip to content

v3.0.0

Latest

Choose a tag to compare

@github-actions github-actions released this 29 Nov 20:03
c018a89

3.0.0 (2026-11-29)

⚠ BREAKING CHANGES

Upgrading from 2.x: Read the Commonmarker 3.0 upgrade guide for the complete defaults table and a copy-paste configuration that restores 2.x output.

  • Default rendering is now plain CommonMark. GFM extensions, heading IDs, hard line breaks, 80-column CommonMark wrapping, emoji shortcodes, and syntax highlighting are no longer enabled by default. Enable syntax highlighting with plugins: { syntax_highlighter: {} }. (#501)
  • Commonmarker is now a class. Commonmarker.to_html, Commonmarker.parse, and Commonmarker::Node#to_html continue to work. Replace module Commonmarker with class Commonmarker; include Commonmarker and extend Commonmarker are no longer supported. (#499)
  • alert_style and list_style require Symbols. Use :specific or :semantic, and :dash, :plus, or :star. (#500)
  • Ruby configuration internals were removed. Commonmarker::Config.process_options, Commonmarker::Config.process_plugins, Commonmarker::Utils, Commonmarker::Constants, and Commonmarker::Config::OPTIONS[:format] are gone. (#420)
  • Rendered output may differ in edge cases because Commonmarker now uses comrak 1.2. Applications with HTML snapshots should review comrak's changelog. Building Commonmarker from source now requires Rust 1.89 or newer. (#495)
  • Syntax highlighters are cached by theme and path for the life of the process. Restart the process after changing custom theme files. (#499)

Features

  • Use comrak's defaults for options and plugins (#501)
  • Require Symbols for alert_style and list_style (#500)
  • Add Commonmarker.new and cache syntax highlighters (#499)
  • Support comrak's attribute blocks (#498)
  • Add the comrak 1.x node types to Node (#497)
  • move all options management to Rust-side (#420)
  • Upgrade to comrak 1.2.0 (#495)

Bug Fixes

  • raise rescuable error for malformed option keys instead of panicking (#505)
  • raise ArgumentError for unknown Node type instead of panicking (#506)
  • enforce max_nesting_depth when rendering a Node (#507)
  • raise ArgumentError for invalid list_type= and alert_type= values (#508)
  • prevent stack overflow in Node#inspect on deeply nested trees (#503)

Performance Improvements

  • Reduce small-file rendering overhead (#502)

Miscellaneous Chores

  • remove the dead Commonmarker::Renderer class (#509)
  • dedup option validation with an opt! macro (#510)
  • remove duplicate .gitignore entries (#511)
  • Bump magnus from 0.9.3 to 0.9.4 (#493)