Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ updates:
- dependency-name: "@tiptap/extension-code"
- dependency-name: "@tiptap/extension-horizontal-rule"
- dependency-name: "@tiptap/extension-italic"
- dependency-name: "@tiptap/extension-link"

- dependency-name: "@tiptap/extension-paragraph"
- dependency-name: "@tiptap/extension-strike"
- dependency-name: "@tiptap/extension-text"
Expand Down
40 changes: 27 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,7 @@
],
"overrides": {
"vitest": "4.1.2",
"@vitest/runner": "4.1.2",
"msw": "2.11.5",
"ai": "6.0.5",
"@ai-sdk/anthropic": "3.0.2",
"@ai-sdk/openai": "3.0.2",
"@ai-sdk/groq": "3.0.2",
"@ai-sdk/google": "3.0.2",
"@ai-sdk/mistral": "3.0.2",
"@ai-sdk/openai-compatible": "2.0.2",
"@ai-sdk/provider-utils": "4.0.2",
"@ai-sdk/react": "3.0.5",
"@ai-sdk/gateway": "3.0.4"
"@vitest/runner": "4.1.2"
}
},
"packageManager": "pnpm@10.23.0+sha512.21c4e5698002ade97e4efe8b8b4a89a8de3c85a37919f957e7a0f30f38fbc5bbdd05980ffe29179b2fb6e6e691242e098d945d1601772cad0fef5fb6411e2a4b",
Expand All @@ -71,5 +60,30 @@
"start": "serve playground/dist -c ../serve.json",
"test": "nx run-many --target=test",
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,css,scss,md}\""
}
},
"overrides": {
"msw": "2.11.5",
"ai": "6.0.5",
"@ai-sdk/anthropic": "3.0.2",
"@ai-sdk/openai": "3.0.2",
"@ai-sdk/groq": "3.0.2",
"@ai-sdk/google": "3.0.2",
"@ai-sdk/mistral": "3.0.2",
"@ai-sdk/openai-compatible": "2.0.2",
"@ai-sdk/provider-utils": "4.0.2",
"@ai-sdk/react": "3.0.5",
"@ai-sdk/gateway": "3.0.4",
"@headlessui/react": "^2.2.4",
"@tiptap/core": "^3.0.0",
"@tiptap/pm": "^3.0.0"
},
"workspaces": [
"packages/*",
"examples/*/*",
"playground",
"fumadocs",
"docs",
"shared",
"tests"
]
}
1 change: 0 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@
"@tiptap/extension-code": "^3.13.0",
"@tiptap/extension-horizontal-rule": "^3.13.0",
"@tiptap/extension-italic": "^3.13.0",
"@tiptap/extension-link": "^3.22.1",
"@tiptap/extension-paragraph": "^3.13.0",
"@tiptap/extension-strike": "^3.13.0",
"@tiptap/extension-text": "^3.13.0",
Expand Down
20 changes: 6 additions & 14 deletions packages/core/src/api/nodeConversions/blockToNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,28 +80,20 @@ function styledTextToNodes<T extends StyleSchema>(

/**
* Converts a Link inline content element to
* prosemirror text nodes with the appropriate marks
* prosemirror text nodes with the link mark applied.
*/
function linkToNodes(
link: PartialLink<StyleSchema>,
schema: Schema,
styleSchema: StyleSchema,
): Node[] {
const linkMark = schema.marks.link.create({
href: link.href,
});
const linkMark = schema.marks.link.create({ href: link.href });

return styledTextArrayToNodes(link.content, schema, styleSchema).map(
(node) => {
if (node.type.name === "text") {
return node.mark([...node.marks, linkMark]);
}

if (node.type.name === "hardBreak") {
return node;
}
throw new Error("unexpected node type");
},
(node) =>
node.type.name === "text"
? node.mark([...node.marks, linkMark])
: node,
);
}

Expand Down
Loading
Loading