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 to HTML: URL links with optional title on next line are broken #10621

Closed
sphakka opened this issue Feb 14, 2025 · 1 comment
Closed
Labels

Comments

@sphakka
Copy link

sphakka commented Feb 14, 2025

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.

@sphakka sphakka added the bug label Feb 14, 2025
@jgm
Copy link
Owner

jgm commented Feb 14, 2025

A newline is supposed to be okay here. This may be a bug in our URL parser, which seems to be gobbling the newline.

@jgm jgm closed this as completed in bf1c17c Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants