Markdown: links and images with spaces in the path lose their angle brackets and become plain text
Affected Packages
markdown, extension-link, extension-image
Tiptap Version
3.31.3
Browser Used
Not browser-specific
What happened?
CommonMark allows spaces in a link or image path only inside angle brackets. Tiptap parses such links correctly, but getMarkdown() drops the brackets:
Input: [My plan](<docs/My Plan.md>)

Output: [My plan](docs/My Plan.md)
The output is not a valid link or image. Loaded again, it shows as plain text. So a single save breaks every link and image with a space in its path. This is common in links to local files.
Expected Behavior
getMarkdown() keeps the angle brackets when the path contains a space (see https://spec.commonmark.org/0.31.2/#link-destination).
Additional Context (Optional)
Setup: new Editor({ extensions: [StarterKit, Markdown, Image], content, contentType: 'markdown' }), then editor.getMarkdown(). Found through OpenCloud, which uses Tiptap for its Markdown editor.
Source: ueberdosis/tiptap