Test all CommonMark spec examples - #168
Merged
Merged
Conversation
Contributor
Author
|
Automated review: Codex CLI (
Codex could not run |
Renders every example of src/data/test/spec.md (CommonMark 0.31.2) with the XHTML renderer, compares it to the expected HTML and fails if any example fails. All 652 examples pass once the conformance fixes split out of #152 are merged; on main 631 pass.
Review feedback from Codex: the first failing assertion stops the test, so the list of failing examples was never shown.
bobzhang
force-pushed
the
conformance/spec-examples-test
branch
from
October 2, 2026 02:05
85258c0 to
1c2b5df
Compare
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.
Split out of #152. Merge last: this requires all the other PRs split out of #152. On
mainalone, this test fails with 631/652, so CI stays red until they are merged.Adds
src/cmark_html/spec_examples_test.mbt. It renders every example ofsrc/data/test/spec.md(CommonMark 0.31.2) with the XHTML renderer, compares the result to the expected HTML, and fails if any example fails. The examples are extracted by a small state machine over the lines of the spec.mainRequired PRs (spec examples each one fixes):
<!-->/<!--->), linear-time guard (626; 621 with Reject invalid raw HTML tags, attributes and email autolinks #154). Accept <!--> and <!---> as HTML comments #155 was folded into it.The other split PRs (#157, #158, #159, #160, #164, #165, #166) fix bugs that no spec example covers.
Verified on a local branch that merges all of them: 652/652 on native, js, wasm-gc and wasm. All regression tests of #152 also pass there.