Repository navigation
Restore <video> in the block-level HTML tag list - #2
Merged
Merged
Conversation
Upstream reverted the video tag extension in mity#428, which this fork inherited. enriched-markdown promotes <video> HTML blocks into video nodes, so without the block form a <video> tag parses as inline raw HTML inside a paragraph and stops rendering as a video. Keep the extension, with the spec coverage the revert deleted, until that renderer no longer depends on the block form. The deviation is marked at the tag table and in the README so a merge from upstream does not silently drop it again. Output is unchanged except for documents containing <video>: of 1034 corpus files (spec suites, fuzz seed corpus, markdown docs, 1000 generated documents) across three flag sets, the only differing cases are the three that contain a <video> tag. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
eszlamczyk
added a commit
to software-mansion/enriched-markdown
that referenced
this pull request
Oct 4, 2026
The parser is synced from software-mansion-labs/md4c, so a sync can change how documents parse without any native build noticing. That is not hypothetical: the migration in the previous commit silently dropped video rendering, because the fork had inherited upstream's revert of <video> as a block-level HTML tag (mity/md4c#428) and MD4CParser only promotes <video> into a video node when the parser reports an HTML block. Add scripts/test-core-parser.sh, run by a core-parser CI job gated on packages/core/cpp changes. It compiles the vendored parser and MD4CParser with the host toolchain, then checks that the parser exports nothing but enrmrkd_* symbols, that the serialized AST of five fixture documents under five flag variants matches a golden dump, and that the parser still links and runs beside upstream mity/md4c (pinned tag) in one binary. The golden dump is re-recorded with --update, so an intended parser change arrives as a reviewable diff. Vendor the fork's restored <video> block tag (software-mansion-labs/md4c#2), which the golden fixtures cover; running the check against the previously vendored parser fails on html-blocks.md in all five variants. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Merged
4 of 6 tasks
eszlamczyk
added a commit
to software-mansion/enriched-markdown
that referenced
this pull request
Oct 16, 2026
* fix: isolate the embedded parser behind an ENRMRKD_ prefix Enriched embedded MD4C under its original global names, so an application that also links another MD4C copy failed with a duplicate definition of md_parse, and the CocoaPods header map could resolve the bare md4c.h include in the Objective-C++ input parser to another pod's copy (#846). Vendor the parser from software-mansion-labs/md4c rather than mity/md4c: the fork renames both the filenames and everything they expose to an ENRMRKD_/enrmrkd_ prefix, so two copies can coexist. Rename the consumers to match, and follow the vendored directory rename through the podspecs, the SwiftPM manifest, the Android CMake files and the example app project. Includes stay plain and keep resolving through each target's header search paths; what removes the header map ambiguity is the filename being specific to the fork, since no other pod ships an enrmrkd.h. The public API is unchanged: md4cFlags, Md4cFlags, MD4CParser and md4cType keep their names. Re-vendoring also moves the parser forward to the fork's master, which carries upstream work postdating the Sep 17 snapshot (HTML block start condition 4, the pipe handling rework, the video tag revert). Serialized ASTs are identical for every markdown file in the repo across five flag variants, and differ on 49 of 1000 generated adversarial documents - for instance an empty "||||" spoiler now staying literal text. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * test(core): guard the vendored parser with golden ASTs in CI The parser is synced from software-mansion-labs/md4c, so a sync can change how documents parse without any native build noticing. That is not hypothetical: the migration in the previous commit silently dropped video rendering, because the fork had inherited upstream's revert of <video> as a block-level HTML tag (mity/md4c#428) and MD4CParser only promotes <video> into a video node when the parser reports an HTML block. Add scripts/test-core-parser.sh, run by a core-parser CI job gated on packages/core/cpp changes. It compiles the vendored parser and MD4CParser with the host toolchain, then checks that the parser exports nothing but enrmrkd_* symbols, that the serialized AST of five fixture documents under five flag variants matches a golden dump, and that the parser still links and runs beside upstream mity/md4c (pinned tag) in one binary. The golden dump is re-recorded with --update, so an intended parser change arrives as a reviewable diff. Vendor the fork's restored <video> block tag (software-mansion-labs/md4c#2), which the golden fixtures cover; running the check against the previously vendored parser fails on html-blocks.md in all five variants. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix: address cr, update ci and rebuild wasm * fix: replace all path-only includes with search-path ones * feat: resolve final issues * docs: web renders videos now that the WASM bundle is rebuilt The rebuilt md4c.js emits the `Video` node that #765 added, and the web renderer has had a `VideoRenderer`, `videoStyle` and the 'Video' node type all along, so the tag now renders as the browser's own `<video>` player. Six doc spots said the opposite, all of them written against the old artifact. Also drops the `unavailable` banner from the video LivePreview, so the style-properties example is live like its neighbours, and rewrites the build.sh note the stale artifact had earned - scripts/test-web-bundle.mjs now guards the bundle itself, so the note only has to warn about prose. Created with usage of AI tools * style(core): clang-format TextLinkRecognizer for the core-parser lint #855 added it under packages/core/cpp/parser unformatted; the core-parser CI job runs yarn lint-clang:core-parser over that directory. --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Upstream reverted the video tag extension in mity/md4c#428, and this fork inherited the revert.
enriched-markdownpromotes<video>HTML blocks into video nodes, so without the block form a<video>tag parses as inline raw HTML inside a paragraph and stops rendering as a video.Found while re-vendoring the fork into
software-mansion/enriched-markdown#922: that repo's previous snapshot predates the upstream revert, so the migration silently dropped video rendering.{"type":"Video","attributes":{"url":"…"}}{"type":"Paragraph","children":[{"type":"Text","content":"<video src=…"}]}{"type":"Video",…}Restores
v6plus itsmap6slot, and thetest/spec-addendum.txtcoverage the revert deleted (6 cases, named for the prefix). Marked as a deliberate fork deviation at the tag table and in the README, so a merge from upstream does not silently drop it again — this is a hold until the renderer no longer depends on the block form, not a disagreement with upstream's reasoning.Verification
scripts/run-tests.py: 1024 passed, 0 failed, 0 errored (1018 before, +6 from the restored spec file); clean Release build.scripts/check-exported-symbols.sh: still onlyenrmrkd_parse,enrmrkd_html,enrmrkd_entity_lookup.<video>tag, none without.MD4CParser: the video document's serialized AST is identical to the previously vendored parser's, and the 41-file markdown corpus is unchanged.🤖 Generated with Claude Code