Skip to content

fix: Link HTML attributes (BLO-915)#2687

Merged
nperez0111 merged 5 commits intomainfrom
link-html-attributes-fix
Apr 30, 2026
Merged

fix: Link HTML attributes (BLO-915)#2687
nperez0111 merged 5 commits intomainfrom
link-html-attributes-fix

Conversation

@matthewlipski
Copy link
Copy Markdown
Collaborator

@matthewlipski matthewlipski commented Apr 29, 2026

Summary

PR #2666 added an option to add/edit the HTML attributes set on links, but this was not working correctly. This PR fixes that and cleans up some redundant code in the link extension.

Closes #1549

Rationale

See above.

Changes

  • Added this.options.HTMLAttributes to rendered link HTML.
  • Removed HTML_Attributes object.

Impact

N/A

Testing

Updated unit tests to include custom HTML link attributes in the editor setup, so regressions are caught in export tests.

Screenshots/Video

N/A

Checklist

  • Code follows the project's coding standards.
  • Unit tests covering the new feature have been added.
  • All existing tests pass.
  • The documentation has been updated to reflect the new feature

Additional Notes

Summary by CodeRabbit

  • New Features

    • Links gain configurable HTML attributes (target, rel, className, custom data attrs).
    • Added a CLI utility to repair and reconcile MSW snapshot artifacts.
  • Tests

    • Centralized snapshot-path generation into a shared helper used across tests.
    • Test editor setup now embeds specific link attributes for rendered links.
  • Chores

    • Updated internal package versions to 0.49.0.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blocknote Ready Ready Preview Apr 30, 2026 3:46pm
blocknote-website Ready Ready Preview Apr 30, 2026 3:46pm

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 29, 2026

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (2)
  • packages/xl-ai/src/prosemirror/__snapshots__/agent.test.ts.snap is excluded by !**/*.snap, !**/__snapshots__/**
  • packages/xl-ai/src/prosemirror/__snapshots__/changeset.test.ts.snap is excluded by !**/*.snap, !**/__snapshots__/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9c79bce4-79ff-4176-b521-1c2fe84fcf85

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Refactors link attribute handling in the Link extension to use configurable HTMLAttributes; updates test app dependency versions to 0.49.0; adds a snapshot-path utility and refactors MSW snapshot path logic across xl-ai tests; adds an msw-snapshot renaming script.

Changes

Cohort / File(s) Summary
Link Extension
packages/core/src/extensions/tiptap-extensions/Link/link.ts
Replace module-level fixed link attributes with addOptions().HTMLAttributes default (includes target, rel, className, data-inline-content-type); remove per-attribute addAttributes() entries; update renderHTML to merge incoming attributes with this.options.HTMLAttributes for both valid and empty-href links.
Test app dependencies
tests/nextjs-test-app/package.json
Bump local tarball dependencies for @blocknote/core, @blocknote/mantine, @blocknote/react, and @blocknote/server-util from 0.48.10.49.0.
Test editor setup
tests/src/unit/core/createTestEditor.ts
Configure test editor schema options to include custom link HTML attributes (e.g., rel="external", data-custom-attribute) when creating BlockNoteEditor for tests.
xl-ai: scripts
packages/xl-ai/package.json, packages/xl-ai/scripts/rename-msw-snapshots.mjs
Add rename-msw-snapshots npm script and introduce scripts/rename-msw-snapshots.mjs, a CLI that walks src, groups __msw_snapshots__ by slot, swaps response bodies between matching 200/non-200 snapshots, writes updated JSON, and removes migrated duplicates.
xl-ai: snapshot path helper & tests
packages/xl-ai/src/api/formats/tests/snapshotPath.ts, packages/xl-ai/src/api/formats/*/*.{test.ts,ts} (e.g., htmlBlocks.test.ts, json.test.ts, markdownBlocks.test.ts)
Add exported createSnapshotPathFn(basePath) utility that computes deterministic MSW snapshot filenames using Vitest's current test, per-directory counters, and a request content hash; refactor tests to delegate createSnapshotPath to this shared function and remove prior per-test hashing/counting logic.

Sequence Diagram(s)

(Skipped — conditions for diagrams not met.)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • nperez0111

Poem

🐇
Tiny paws across the code, I hop,
Links no longer forced to stop.
Attributes now dance and play,
Let devs decide the proper way.
A carrot-treat for tests today! 🥕

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Out of Scope Changes check ❓ Inconclusive Most changes are in-scope; however, the MSW snapshot refactoring (renaming script, snapshot path utilities, and test file updates) appears to be a secondary concern addressing technical debt from the link schema change rather than the primary fix. Clarify whether the MSW snapshot refactoring should be part of this PR or split into a separate maintenance PR to keep the primary fix focused and easier to review.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change—fixing link HTML attributes handling—and references the issue being addressed.
Description check ✅ Passed The description follows the template structure with all major sections completed: Summary, Rationale, Changes, Impact, Testing, and Checklist all filled in with relevant details.
Linked Issues check ✅ Passed The PR addresses the core requirement from #1549 by enabling configurable HTML attributes on links and removing hardcoded rel attributes, allowing developers to control link behavior.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch link-html-attributes-fix

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/core/src/extensions/tiptap-extensions/Link/link.ts (1)

119-137: ⚠️ Potential issue | 🟠 Major

Preserve noopener noreferrer when callers override rel.

The new shallow merge lets a custom rel replace the default safety tokens entirely. With target="_blank" still emitted, a consumer setting rel: "external" will drop opener protection and reintroduce reverse-tabnabbing risk.

Suggested fix
-    return [
-      "a",
-      mergeAttributes(HTMLAttributes, this.options.HTMLAttributes),
-      0,
-    ];
+    const mergedRel = [
+      HTMLAttributes.rel,
+      this.options.HTMLAttributes.rel,
+    ]
+      .filter(Boolean)
+      .join(" ");
+
+    return [
+      "a",
+      mergeAttributes(HTMLAttributes, {
+        ...this.options.HTMLAttributes,
+        rel: mergedRel,
+      }),
+      0,
+    ];
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/core/src/extensions/tiptap-extensions/Link/link.ts` around lines 119
- 137, In renderHTML (the method using this.options.isValidLink, mergeAttributes
and this.options.HTMLAttributes) the shallow merge lets a caller-supplied rel
replace the default "noopener noreferrer" and thus loses opener protection when
target="_blank"; after merging attributes (both in the invalid-link branch and
the valid branch) ensure that if the final attributes include target ===
"_blank" then the rel value is normalized to include "noopener" and "noreferrer"
(merge any existing tokens from the caller, avoid duplicates, e.g. split on
whitespace into a Set and join back) so callers can augment rel without removing
the required safety tokens.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@packages/core/src/extensions/tiptap-extensions/Link/link.ts`:
- Around line 119-137: In renderHTML (the method using this.options.isValidLink,
mergeAttributes and this.options.HTMLAttributes) the shallow merge lets a
caller-supplied rel replace the default "noopener noreferrer" and thus loses
opener protection when target="_blank"; after merging attributes (both in the
invalid-link branch and the valid branch) ensure that if the final attributes
include target === "_blank" then the rel value is normalized to include
"noopener" and "noreferrer" (merge any existing tokens from the caller, avoid
duplicates, e.g. split on whitespace into a Set and join back) so callers can
augment rel without removing the required safety tokens.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 90794851-2f1e-480c-ace5-4e03791ef8f4

📥 Commits

Reviewing files that changed from the base of the PR and between 38c5515 and 8e9a98e.

⛔ Files ignored due to path filters (5)
  • tests/src/unit/core/formatConversion/export/__snapshots__/blocknoteHTML/hardbreak/between-links.html is excluded by !**/__snapshots__/**
  • tests/src/unit/core/formatConversion/export/__snapshots__/blocknoteHTML/hardbreak/link.html is excluded by !**/__snapshots__/**
  • tests/src/unit/core/formatConversion/export/__snapshots__/blocknoteHTML/link/adjacent.html is excluded by !**/__snapshots__/**
  • tests/src/unit/core/formatConversion/export/__snapshots__/blocknoteHTML/link/basic.html is excluded by !**/__snapshots__/**
  • tests/src/unit/core/formatConversion/export/__snapshots__/blocknoteHTML/link/styled.html is excluded by !**/__snapshots__/**
📒 Files selected for processing (3)
  • packages/core/src/extensions/tiptap-extensions/Link/link.ts
  • tests/nextjs-test-app/package.json
  • tests/src/unit/core/createTestEditor.ts

…me script

The link extension cleanup changed the request body sent to LLMs, breaking
the md5-based filenames msw-snapshot uses to look up cached responses.
Migrated 56 affected snapshots to their new hashes by transplanting the
recorded 200 responses into the matching new-hash files, and added
`pnpm rename-msw-snapshots` so the same migration can be run again the
next time the request shape changes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/xl-ai/scripts/rename-msw-snapshots.mjs`:
- Around line 75-109: The script currently replaces the 200 response from
good[0] into target without ensuring they are the same request; compute a stable
request identity (e.g. serialize request method+url+headers+body or hash
request.body + request.url) from each entry (entries[].data.request) and verify
that good[0] and target share the same identity before transplanting; if the
identities differ, increment skipped and push a skip note (similar to existing
logic) and continue, otherwise perform the response copy and deletes as before
(use symbols: groups, entries, good, bad, target, skipped, skipNotes).
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 06059e7f-3873-4a90-8b8d-45023fccdeef

📥 Commits

Reviewing files that changed from the base of the PR and between 8e9a98e and 81fed80.

⛔ Files ignored due to path filters (67)
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add and update paragraph_1_0acceced44cd885ee4439d4ef8639ba2.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/add paragraph and update selection_1_9f552939a63a167da4dd5b1abffbfc43.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add and update paragraph_1_f5ce14780d38e0a320dc0246f9fa3fa7.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add paragraph and update selection_1_8157654938ade250b36e1dde3bf0a5c2.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add and update paragraph_1_eb11dd6643fc4f655a9d55dbd71b19b9.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/add paragraph and update selection_1_bcb205a92155b4f033637eb9f5fb2d3b.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/delete first block_1_de1c4968c1329dacd5d81bcd2b3ed8d1.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/delete first block_1_df7ac05af05cf3c79699aabb8ea42853.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/delete first block_1_2c1689a55eb91228110b68a63451fd1a.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/drop mark and link and change text within mark_1_7269bbc0b34bc5775aa44079fb454ffb.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/drop mark and link_1_e3dcd01b4daf96d961ea02871bebdc41.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/plain source block, add mention_1_697fa8208493812d2a1e80e1aaf9c5de.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/standard update_1_1aee87323867b909b4239664f8b71087.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, remove mark_1_7e627acd5601089ce51f17d48a125d26.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, remove mention_1_191aa134e34de44ad154b02c452f2a13.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, replace content_1_f1ad8291536f56abe5780af9c67a719e.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, update mention prop_1_09e4b9d91e0003a97447e19e13c71fae.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in source block, update text_1_135a07dea96ec03fd66a4f9d14bffaab.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in target block, add mark (paragraph)_1_057de0a27c49b9bc6acd8203ecddd838.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/styles + ic in target block, add mark (word)_1_cea1695dae5f5462ee9ab5a7400fee2f.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/translate selection_1_2164172c277a84ca943d79ae55a7c655.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/update block prop and content_1_e89f2ff97bb5e14d9f8e7c4bbb03af6f.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/update block prop_1_fabe61c81d039e0c80c38121db6daef1.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/update block type and content_1_92d996135152e832c6db18b41f6b6912.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/anthropic.messages/claude-3-7-sonnet-latest (streaming)/update block type_1_be165931651bf1c2e817e30b34cacddd.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/drop mark and link and change text within mark_1_02b8585f48a09784036175bf14c592cd.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/drop mark and link_1_5153f11ec2928539607eae3fc9554a2e.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/plain source block, add mention_1_f33053e9ce75e3382e59f65f47268a07.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/standard update_1_3701c48442d9b752a7ea313e3255163c.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, remove mark_1_dd318513d3f70effe9df402a04ebe20e.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, remove mention_1_df29b6d9520b0719a02ff9f241d8fd12.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, replace content_1_353407caea15e5886ca416c18085f09c.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, update mention prop_1_545d20572920e7098f9e71846d69942e.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, update text_1_f94a68a64c18b7537380682b3e0fa902.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in target block, add mark (paragraph)_1_b625ba3069c0ee0677dbab599b173252.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in target block, add mark (word)_1_f9207412b6a2032fd012f61be3d16b7b.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/translate selection_1_1d088b7563942b1405ced6473b89b3ea.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block prop and content_1_7aec058255eb34b8dd1fcc434173ed62.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block prop_1_f4d4d0847f49e3177b2090d2dfcdf4a8.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block type and content_1_bb2150f4fbbd0d60e298c14879b5d98c.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block type_1_0cc06aead6a8738ef5ae9397d449a4bb.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/drop mark and link and change text within mark_1_3b2d04fb8cc28b3327eac7fbb649212c.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/drop mark and link_1_7376633d53b21fc3dbe3c1f051cd2940.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/plain source block, add mention_1_f44ed609f9d070a9db6e3357eb3b4b12.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/standard update_1_f38c18ce0c3c0d617287e458c9a79fc6.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mark_1_58230e87771d121dabc82e08fdabeec9.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mention_1_501a15f4ae0e22db498c2a018f67c304.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, replace content_1_3a53469420cab77a1672183bf403d5f1.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update mention prop_1_d2d711f753398974c968fc07f4ded143.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update text_1_42c93de53980c01c69a514f6eea5f7c7.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (paragraph)_1_c899778ecf731961e7554d0dd99c1048.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (word)_1_6de7b8e48053b34c8c48307442ebdaf9.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/translate selection_1_2be264b1a0ad629a6626df5dc6dc95ff.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/update block prop and content_1_cc8d5c88299059d82196af81416f61e4.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/update block prop_1_c3507737f635c70e33af6d9967568ce6.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/update block type and content_1_0e4e3658327ed05d3accbdb2649b4409.json is excluded by !**/__snapshots__/**
  • packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.responses/gpt-4o-2024-08-06 (streaming)/update block type_1_14269fdf643fd47ec85aa390368ef71a.json is excluded by !**/__snapshots__/**
  • tests/src/unit/core/formatConversion/export/__snapshots__/html/hardbreak/between-links.html is excluded by !**/__snapshots__/**
  • tests/src/unit/core/formatConversion/export/__snapshots__/html/hardbreak/link.html is excluded by !**/__snapshots__/**
  • tests/src/unit/core/formatConversion/export/__snapshots__/html/link/adjacent.html is excluded by !**/__snapshots__/**
  • tests/src/unit/core/formatConversion/export/__snapshots__/html/link/basic.html is excluded by !**/__snapshots__/**
  • tests/src/unit/core/formatConversion/export/__snapshots__/html/link/styled.html is excluded by !**/__snapshots__/**
  • tests/src/unit/core/formatConversion/export/__snapshots__/nodes/hardbreak/between-links.json is excluded by !**/__snapshots__/**
  • tests/src/unit/core/formatConversion/export/__snapshots__/nodes/hardbreak/link.json is excluded by !**/__snapshots__/**
  • tests/src/unit/core/formatConversion/export/__snapshots__/nodes/link/adjacent.json is excluded by !**/__snapshots__/**
  • tests/src/unit/core/formatConversion/export/__snapshots__/nodes/link/basic.json is excluded by !**/__snapshots__/**
  • tests/src/unit/core/formatConversion/export/__snapshots__/nodes/link/styled.json is excluded by !**/__snapshots__/**
📒 Files selected for processing (6)
  • packages/xl-ai/package.json
  • packages/xl-ai/scripts/rename-msw-snapshots.mjs
  • packages/xl-ai/src/api/formats/html-blocks/htmlBlocks.test.ts
  • packages/xl-ai/src/api/formats/json/json.test.ts
  • packages/xl-ai/src/api/formats/markdown-blocks/markdownBlocks.test.ts
  • packages/xl-ai/src/api/formats/tests/snapshotPath.ts
✅ Files skipped from review due to trivial changes (1)
  • packages/xl-ai/package.json

Comment thread packages/xl-ai/scripts/rename-msw-snapshots.mjs
The link mark no longer stores target/rel as schema attrs; they're
applied during HTML rendering via HTMLAttributes options.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 30, 2026

Open in StackBlitz

@blocknote/ariakit

npm i https://pkg.pr.new/@blocknote/ariakit@2687

@blocknote/code-block

npm i https://pkg.pr.new/@blocknote/code-block@2687

@blocknote/core

npm i https://pkg.pr.new/@blocknote/core@2687

@blocknote/mantine

npm i https://pkg.pr.new/@blocknote/mantine@2687

@blocknote/react

npm i https://pkg.pr.new/@blocknote/react@2687

@blocknote/server-util

npm i https://pkg.pr.new/@blocknote/server-util@2687

@blocknote/shadcn

npm i https://pkg.pr.new/@blocknote/shadcn@2687

@blocknote/xl-ai

npm i https://pkg.pr.new/@blocknote/xl-ai@2687

@blocknote/xl-docx-exporter

npm i https://pkg.pr.new/@blocknote/xl-docx-exporter@2687

@blocknote/xl-email-exporter

npm i https://pkg.pr.new/@blocknote/xl-email-exporter@2687

@blocknote/xl-multi-column

npm i https://pkg.pr.new/@blocknote/xl-multi-column@2687

@blocknote/xl-odt-exporter

npm i https://pkg.pr.new/@blocknote/xl-odt-exporter@2687

@blocknote/xl-pdf-exporter

npm i https://pkg.pr.new/@blocknote/xl-pdf-exporter@2687

commit: 45e1d59

@nperez0111 nperez0111 merged commit 15eab07 into main Apr 30, 2026
12 checks passed
@nperez0111 nperez0111 deleted the link-html-attributes-fix branch April 30, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BlockNote Editor Automatically Adds rel="nofollow" to Links, Hurting SEO

2 participants