Conversation
🦋 Changeset detectedLatest commit: e6f99e5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 72 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. |
There was a problem hiding this comment.
Pull request overview
Fixes a Twitch embed round-trip issue in @tiptap/extension-twitch where the original Twitch URL (video/clip/channel) could be lost when content is rendered to HTML and then parsed back into the editor.
Changes:
- Added a utility to reverse-parse Twitch embed URLs back into canonical node attributes (
src, plus relevant params). - Updated the Twitch node’s
addAttributes().parseHTMLhandling to restore canonicalsrc(and parse width/height/autoplay/muted/time from HTML). - Added a regression test to verify
srcis preserved across HTML round-trips, plus a changeset entry.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| packages/extension-twitch/src/utils.ts | Adds getAttributesFromTwitchEmbedUrl to convert embed URLs back into canonical Twitch node attrs. |
| packages/extension-twitch/src/twitch.ts | Wires new parsing into parseHTML for node attributes so HTML re-import preserves canonical src. |
| packages/extension-twitch/tests/twitch.spec.ts | Adds round-trip regression test ensuring src survives HTML export/import. |
| .changeset/green-stingrays-shop.md | Adds a patch changeset describing the user-facing fix. |
|
Should we do the same in the YouTube extension? |
|
Yep, good call. I pushed a follow-up that does the same round-trip fix for YouTube as well, and updated the changeset too. |
13a1687 to
e6f99e5
Compare
Changes Overview
Implementation Approach
packages/extension-twitch/src/utils.tsand wiredparseHTMLattribute parsing for the Twitch node inpackages/extension-twitch/src/twitch.ts.packages/extension-twitch/__tests__/twitch.spec.ts.Testing Done
Verification Steps
Additional Notes
.changeset/green-stingrays-shop.mdwith a short user-facing note. No public API changes were made.Checklist
pnpm lintif needed).Related Issues