Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown link to file broken when it contains spaces #417

Open
jotabe-net opened this issue Dec 3, 2024 · 0 comments
Open

Markdown link to file broken when it contains spaces #417

jotabe-net opened this issue Dec 3, 2024 · 0 comments

Comments

@jotabe-net
Copy link

jotabe-net commented Dec 3, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant