Skip to content

Commit 2041987

Browse files
committed
docs: clarify CommonMarker testing and extension behavior
I keep the development version override in the README and place full test commands in CONTRIBUTING. I correct comments about modern-only extensions without changing rendering. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6fe372b1-3ff6-4129-9d33-be564fb6a5f0 Signed-off-by: Zack Koppert <zkoppert@github.com>
1 parent c126c01 commit 2041987

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ cd script
8484
./bootstrap
8585
```
8686

87-
The development bundle uses CommonMarker 2.8.2 by default. Set `COMMONMARKER_VERSION` to test another version, then resolve dependencies with `bundle update commonmarker`. See [Testing](CONTRIBUTING.md#testing) for commands.
87+
Set `COMMONMARKER_VERSION` to override the development bundle's default `~> 2.8.2` requirement. See [Testing](CONTRIBUTING.md#testing) for parser version commands.
8888

8989
Contributing
9090
------------

‎lib/github/markup/markdown.rb‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,16 @@ class Markdown < Implementation
6464
:greentext, :alerts, :description_lists
6565
extension_options[ext] = true
6666
when :header_ids
67-
# header_ids takes a string prefix in 2.x rather than a boolean. The legacy contract
68-
# only passed it as a symbol, so use an empty prefix to enable anchor generation.
67+
# header_ids takes a string prefix in 2.x rather than a boolean. An empty prefix
68+
# enables anchor generation for the symbol-based commonmarker_exts option.
6969
extension_options[:header_ids] = ""
7070
else
7171
raise ArgumentError, "unknown commonmarker extension: #{ext.inspect}"
7272
end
7373
end
7474

75-
# Several extensions (tagfilter, autolink, table, strikethrough, tasklist, shortcodes)
76-
# are enabled by default in commonmarker 2.x but were strictly opt-in in 0.x. Explicitly
77-
# disable any extension the caller did not request so behavior matches the legacy contract.
75+
# CommonMarker 2.x enables more extensions by default than this wrapper does.
76+
# Disable unrequested defaults to preserve the wrapper's extension choices.
7877
[:strikethrough, :tagfilter, :autolink, :table, :tasklist, :shortcodes].each do |ext|
7978
extension_options[ext] = false unless extension_options[ext]
8079
end

0 commit comments

Comments
 (0)