fix(static-renderer): close audio and video tags instead of self-closing - #8138
fix(static-renderer): close audio and video tags instead of self-closing#8138lazerg wants to merge 2 commits into
Conversation
🦋 Changeset detectedLatest commit: 6428a8e The changes in this PR will be included in the next version bump. This PR includes changesets to release 74 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for tiptap-embed ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughSummary
WalkthroughThe static renderer now outputs explicit closing tags for ChangesStatic renderer media tags
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/static-renderer/__tests__/pm-self-closing-tags.spec.ts`:
- Around line 34-58: Extend the existing static renderer tests with a regression
case containing multiple media nodes and a paragraph between or after them. Use
renderToHTMLString with the existing extensions, then assert the exact HTML
preserves sibling order and emits explicit closing tags for every audio and
video element, including the paragraph content.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 13576658-e535-4d5b-9961-84e856f311b9
📒 Files selected for processing (3)
.changeset/2026-07-29-static-renderer-audio-video.mdpackages/static-renderer/__tests__/pm-self-closing-tags.spec.tspackages/static-renderer/src/pm/html-string/html-string.ts
Fixes
Fixes #8130
Changes and Review
The static renderer closed a fixed set of element tags and treated everything else as self-closing.
audioandvideowere not in that set, so they came out as<audio/>/<video/>. Browsers don't treat those as void elements, so any following content got nested inside the first one and only the first player rendered. Adding both to the set makes them render as<audio></audio>. Reviewers can render a doc with two audio nodes throughrenderToHTMLStringand confirm each tag is closed.Checklist
Responsibility