Skip to content

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

@Maneren

Description

@Maneren

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions