Expand Markpub parser test coverage#31
Merged
pfefferle merged 1 commit intoadd/markpub-parserfrom Apr 23, 2026
Merged
Conversation
Fill the branch-coverage gaps flagged during the Markpub parser review. Adds tests for list handler (ordered/unordered, empty-item skip, inline formatting), quote handler (inner paragraph, multi-line, innerHTML fallback), container handler (group, columns, column), fallback delegation, image-without-img-tag, heading default level, whitespace handling for heading/paragraph, code language fence, code entity decoding, link paren encoding, <br> hard break, inline entity decoding, inline image, and nested inline formatting. Tightens four existing contract assertions from assertStringContainsString to assertSame so format drift surfaces as a test failure. Extends the atmosphere_html_to_markdown filter test to verify the 2-arg contract. Fixes #30 Stacked on #9 — merge that first.
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.
Fixes #30
Stacked on #9. Merge that first.
Proposed changes:
listing()ordered/unordered/empty-skip/inline-formatting,quote()inner paragraph/multi-line/innerHTML fallback,container()forcore/group/core/columns/core/column,fallback()delegation to container when innerBlocks exist.<br>hard break, inline entity decoding, inline image inside paragraph, nested bold/italic.assertStringContainsStringtoassertSame, and extendtest_html_to_markdown_filterto verify the(markdown, content)2-arg contract.Whitespace-handling tests use mixed-content fixtures (whitespace block followed by a non-empty sibling) so a regression returning
""from a handler fails the exact-match assertion rather than being masked byparse()'s whole-post empty guard.Other information:
Testing instructions:
npm run env-test -- --filter=Test_Markpub— all 40 tests pass (54 assertions).composer lint— zero PHPCS errors.Changelog entry
Tests-only change, no user-facing impact. Using "Skip Changelog" label.