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

Missing link: macro in AsciiDoc for uncommon URL protocols #10105

Closed
Maneren opened this issue Aug 21, 2024 · 3 comments
Closed

Missing link: macro in AsciiDoc for uncommon URL protocols #10105

Maneren opened this issue Aug 21, 2024 · 3 comments
Labels

Comments

@Maneren
Copy link

Maneren commented Aug 21, 2024

Hello.

Explain the problem.
Links in AsciiDoc can be specified in few different ways, most notably as bare autolinks (https://google.com[Google]) or using the link macro (link:https://google.com[Google]). Pandoc currently uses the autolink for all links that start with a protocol (specifically those that contain a :), however AsciiDoc only recognizes a handful of most common protocols as autolinks (like http, ftp, mailto, ...), requiring the link: prefix for the rest (like smb).

The quick and dirty solution would be to just remove the if check that prevents the output of link: when deemed unnecessary. The only effect of that I can think of is to remove a bit of visual clutter but without any functional impact (I am not AsciiDoc expert so I may be missing something here tho).

Other, more correct, solution would be to mirror the AsciiDoc's list of supported protocols and depending on that add link: only if neccessary.

Pandoc version?
3.3

@Maneren Maneren added the bug label Aug 21, 2024
@Maneren Maneren changed the title Output link: for every link in AsciiDoc Missing link: macro in AsciiDoc for uncommon URL protocols Aug 21, 2024
@jgm
Copy link
Owner

jgm commented Aug 22, 2024

Sounds good. What is asciidoc's list of supported protocols? We can add that check.

@Maneren
Copy link
Author

Maneren commented Aug 23, 2024

AsciiDoctor officially supports only http, https, ftp, irc and mailto protocols for autolinks. All other need link:

@jgm jgm closed this as completed in 6c46913 Aug 23, 2024
@Maneren
Copy link
Author

Maneren commented Aug 24, 2024

Thanks a lot, your response speed to these is just incredible

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