microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.05k stars 28.8k forks source link

Support literals in the markdown link fragments #228085

Open gmccullo opened 3 weeks ago

gmccullo commented 3 weeks ago

You can make links with unescaped paths using angle brackets. So for example this:

[foobar](<some path/target.md>)

rather than this:

[foobar](some%20path/target.md)

But it would be nice to also be able to unescape fragments. So for example this:

[foorbar](<some path/target.md#some header>)

rather than this:

[foorbar](some%20path/target.md#some%20header)

This is not currently supported. I have been unable to find this specifically called out in the commonmark spec, but at least some md editors/readers support (e.g., Obsidian).

mjbvz commented 3 weeks ago

Seems to work on common mark so I'd say we should support it