Open
Conversation
Also set fail-fast: false so one implementation's failure doesn't cancel the others.
commonmarker 2.x uses a Rust/Magnus native extension that cannot build on JRuby (no universal-java variant) or TruffleRuby (magnus 0.8.2 is incompatible with TruffleRuby's rb-sys bindings). Since commonmarker is only used in one spec (validating MarkdownEscaper against CommonMark Spec 0.31.2 fixtures), gate it with install_if so it's resolved into the lockfile but only installed on MRI, and skip the spec on non-MRI engines. Add universal-java to the lockfile platforms so JRuby can resolve the bundle.
Nokogiri::HTML5 is not available on JRuby (upstream issue sparklemotion/nokogiri#2227), which blocked running the test suite and using the HTML parser on JRuby. The generic Nokogiri::HTML parser works on all engines. The AST output is identical in practice: the registered handlers only cover basic formatting, lists, links, images, code, quotes, and tables. Table support treats thead/tbody/tfoot as transparent wrappers, so the one notable HTML5/HTML4 difference (implicit tbody insertion) has no effect on the resulting AST.
The existing assertion required the recovered tree to be a single nested <b><i>italic</i></b>. That holds on libxml2 (MRI/TruffleRuby) but not on JRuby's NekoHTML, which leaves <b> and <i> as siblings. Both are valid recoveries — nothing crashes, and all text survives. Assert only that the first child is still a Bold and that both words appear somewhere in the tree, which is what "gracefully" actually means.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fail-fast: false)commonmarkeron MRI viainstall_if— its Rust/Magnus extension can't build on JRuby or TruffleRuby. Lockfile resolves for all platforms; install is MRI-only, and the one commonmarker-dependent spec is skipped on other engines.universal-javaadded to lockfile platforms.Nokogiri::HTML5toNokogiri::HTML— HTML5 isn't available on JRuby ([feature request] HTML5 parser for JRuby implementation sparklemotion/nokogiri#2227). Practical AST output is identical for the handlers we register.