#8374·tiptap

Markdown: links and images with spaces in the path lose their angle brackets and become plain text

Author: duderikCreated Sep 23, 2026Updated Sep 24, 2026
Labelsarea: markdowncomplexity: mediumimpact: medium

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:

markdown
Input:   [My plan](<docs/My Plan.md>)
         ![](<images/My Photo.png>)

Output:  [My plan](docs/My Plan.md)
         ![](images/My Photo.png)

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.