Rewrap
Rewrap copied to clipboard
Markdown link to file broken when it contains spaces
When you have a markdown link to a file containing spaces like this (pipe showing max line length):
|
This is an example of a
broken link to a file:
[Link to a file](<Name of
the file.md>)
In this case, the link, delimited by (<and >) should be kept in a single line, because the link destination can't contain new lines, according to CommonMark specs for link destination:
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
The key part here is "that contains no line endings"
This is different to #112, which refers to new lines in the link title, but that is allowed by the link title specs:
Although link titles may span multiple lines, they may not contain a blank line.