Parent
#328. Related: #174
Problem
Markdown import and connected-app writes store links on the old link mark. The pad cannot preview or edit such a link. parseMarkdown uses the export manager (markdownExport.ts). StarterKit's link comes first there, so it claims the Markdown link token.
What to do
In markdownExtensions (markdownExport.ts), move Hyperlink before ...migrationExtensions. @tiptap/markdown picks the first extension that claims a token. The claim order is not documented, so add a comment on the order. Export still serializes stored link marks, so keep link in the set. Do not build a second manager.
Checked with Bun on 2026-09-29: the reorder gives hyperlink, and export output is byte-identical. The reorder sets no title attr. On hyperlink, title is cached preview metadata.
Acceptance
Out of scope
Rewriting stored link marks. #174. #244.
Parent
#328. Related: #174
Problem
Markdown import and connected-app writes store links on the old
linkmark. The pad cannot preview or edit such a link.parseMarkdownuses the export manager (markdownExport.ts). StarterKit'slinkcomes first there, so it claims the Markdown link token.What to do
In
markdownExtensions(markdownExport.ts), moveHyperlinkbefore...migrationExtensions.@tiptap/markdownpicks the first extension that claims a token. The claim order is not documented, so add a comment on the order. Export still serializes storedlinkmarks, so keeplinkin the set. Do not build a second manager.Checked with Bun on 2026-09-29: the reorder gives
hyperlink, and export output is byte-identical. The reorder sets notitleattr. Onhyperlink,titleis cached preview metadata.Acceptance
parseMarkdown('[Budget](https://example.test/p?id=a)')gives ahyperlinkmark with the samehref.**[bold](https://a.test)**keepsboldand getshyperlink.linkmarks is unchanged.markdownImport.test.tspins the mark name. Prove it by sabotage: undo the reorder, and the test must fail.<a href>bullet inapps/hocuspocus.server/CLAUDE.md§HTTP Modules no longer calls this a known divergence.CHANGELOG.md[Unreleased]has a### Fixedline.Out of scope
Rewriting stored
linkmarks. #174. #244.