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 parts in link_attributes extension support #43

Open
Omikhleia opened this issue Nov 10, 2022 · 1 comment
Open

Missing parts in link_attributes extension support #43

Omikhleia opened this issue Nov 10, 2022 · 1 comment

Comments

@Omikhleia
Copy link
Contributor

Omikhleia commented Nov 10, 2022

For recollection and possible future improvement, the link_attributes extension support added in #36 is partial: it is supported on direct images only... but not on links and indirect images.

For parity with Pandoc, these should be supported:

On [link](#target){ #source .class key=value }

On [indirect link][reflink]

[reflink]: #target { #source .class key=value }

On ![indirect image][imgref]

[imgref]: image.png "opt title" {#id .class key=value}

Generating, e.g. in HTML, something such as:

<p>On <a href="#target" id="source" class="class" data-key="value">link</a></p>
<p>On <a href="#target" id="source" class="class" data-key="value">indirect link</a></p>
<p>On <img src="image.png" title="opt title" id="id" class="class" data-key="value" alt="indirect image" /></p>
@Witiko
Copy link
Collaborator

Witiko commented Nov 25, 2022

Furthermore, we should also support attributes on autolinks:

<mailto:some@one.name>{.family}

In HTML, this should produce the following output:

<p><a href="mailto:some@one.name" class="family">mailto:some@one.name</a></p>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants