[GH-ISSUE #424] No bare URL (MD034) doesn't support autolink titles #353

Closed
opened 2026-03-03 01:25:58 +03:00 by kerem · 3 comments
Owner

Originally created by @mondeja on GitHub (Aug 30, 2021).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/424

I'm not sure if I should open this here, please close it if you found it out of scope.

The problem is simple, an autolink with title like <https://foo.bar "with title"> breaks the MD034 rule. I've seen that this parsing is not supported by markdown-it, but other parsers based on CommonMark like MD4C support it.

The latest CommonMark spec is not clear about if it should be supported, possibly breaking the "Spaces are not allowed in autolinks" statement.

So I'm very confused here. Should markdownlint allow that? Should CommonMark spec clarify this? Is possible to use a markdown-it plugin that implements this when using markdownlint?

Thanks for your great work!

Originally created by @mondeja on GitHub (Aug 30, 2021). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/424 I'm not sure if I should open this here, please close it if you found it out of scope. The problem is simple, an autolink with title like `<https://foo.bar "with title">` breaks the MD034 rule. I've seen that this parsing [is not supported by markdown-it](https://markdown-it.github.io/#md3=%7B%22source%22%3A%22%3Chttps%3A%2F%2Fautolink.ext%20%5C%22with%20title%5C%22%3E%22%2C%22defaults%22%3A%7B%22html%22%3Afalse%2C%22xhtmlOut%22%3Afalse%2C%22breaks%22%3Afalse%2C%22langPrefix%22%3A%22language-%22%2C%22linkify%22%3Atrue%2C%22typographer%22%3Afalse%2C%22_highlight%22%3Atrue%2C%22_strict%22%3Afalse%2C%22_view%22%3A%22html%22%7D%7D), but other parsers based on CommonMark like [MD4C](https://github.com/mity/md4c) support it. The latest [CommonMark spec is not clear about if it should be supported](https://spec.commonmark.org/0.30/#autolink), possibly breaking the "Spaces are not allowed in autolinks" statement. So I'm very confused here. Should markdownlint allow that? Should CommonMark spec clarify this? Is possible to use a markdown-it plugin that implements this when using markdownlint? Thanks for your great work!
kerem 2026-03-03 01:25:58 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@nschonni commented on GitHub (Aug 30, 2021):

It doesn't seem that autolinks support titles at all

<!-- gh-comment-id:908343425 --> @nschonni commented on GitHub (Aug 30, 2021): It doesn't seem that autolinks support titles at all
Author
Owner

@DavidAnson commented on GitHub (Aug 30, 2021):

Agreed, example 601 of the CommonMark specification explicitly forbids space in autolinks: https://spec.commonmark.org/0.30/#example-601

That said, MD034 is written so that if a markdown extension parsed an autolink with a space, it would not then be reported as a violation.

<!-- gh-comment-id:908453809 --> @DavidAnson commented on GitHub (Aug 30, 2021): Agreed, example 601 of the CommonMark specification explicitly forbids space in autolinks: https://spec.commonmark.org/0.30/#example-601 That said, MD034 is written so that if a markdown extension parsed an autolink with a space, it would not then be reported as a violation.
Author
Owner

@mondeja commented on GitHub (Aug 30, 2021):

OK, thanks!

<!-- gh-comment-id:908472630 --> @mondeja commented on GitHub (Aug 30, 2021): OK, thanks!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#353
No description provided.