Skip to content

Markdown link to file broken when it contains spaces #417

Description

@jotabe-net

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions