Skip to content

markdown to HTML: URL links with optional title on next line are broken #10621

@sphakka

Description

@sphakka

I usually wrap long lines in my markdown files for more readability. I just realized that this may break URL links.

MWE (second line wrapped automatically by Emacs' markdown-mode):

[Test link with title on the same line is OK](http://fooooooooooooooooo.bar "Foo bar")

[Test link with title on the next line is KO](http://fooooooooooooooooo.bar
"Foo bar")

Then, with Pandoc version: 3.6.2:

$ pandoc -t html test-link_wit_title.md 
<p><a href="http://fooooooooooooooooo.bar" title="Foo bar">Test link
with title on the same line is OK</a></p>
<p><a href="http://fooooooooooooooooo.bar%20%22Foo%20bar%22">Test link
with title on the next line is KO</a></p>

I couldn't find the exact markdown specification, so wonder if it's a bug or a design limitation
-- See also this foreign report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions