How to use spaces in markdown links

While researching how to use one directional links in Obsidian without creating backlinks, I came across Markdown links which achieve this. But they don’t support spaces in the link by default. Here are some ways to work around this:

Markdown links don’t support spaces in Obsidian.

Example

This link [Blender pip Qt addon](Blender pip Qt addon.md)
Opens the Blender.md file instead, because there is a space in the link.

Workarounds

:cross_mark: escape space characters doesn’t work in Obsidian
[Obsidian - one way wikilinks](<Obsidian\ -\ one\ way\ wikilinks.md>)
it creates a new note wikilinks.md

:white_check_mark: replacing space with %20 works
`[Obsidian - one way wikilinks](Obsidian%20-%20one%20way%20wikilinks.md)`
Obsidian - one way wikilinks

:white_check_mark: Wrapping the link target in angle brackets works.
`[Obsidian - one way wikilinks](<Obsidian - one way wikilinks.md>)`
Obsidian - one way wikilinks
`[Obsidian - one way wikilinks](<Obsidian - one way wikilinks>)`
Obsidian - one way wikilinks

Angle brackets tell the parser to treat everything inside as a literal URL, including spaces.

1 Like

Just for reference: This is specified in the CommonMark specification:

A link destination consists of either

  • a sequence of zero or more characters between an opening < and a closing > that contains no line endings or unescaped < or > characters, or
  • a nonempty sequence of characters that does not start with <, does not include ASCII control characters or space character, and includes parentheses only if (a) they are backslash-escaped or (b) they are part of a balanced pair of unescaped parentheses. (Implementations may impose limits on parentheses nesting to avoid performance issues, but at least three levels of nesting should be supported.)