executablebooks / MyST-Parser

An extended commonmark compliant parser, with bridges to docutils/sphinx
https://myst-parser.readthedocs.io
MIT License
736 stars 195 forks source link

Add support for the keys "target" and "rel" in inline_attrs #820

Closed JonZeolla closed 5 months ago

JonZeolla commented 10 months ago

Describe the feature you'd like to request

I would like to be able to create a link that, when clicked, opens in a new tab.

I found that in the documentation, "only certain key-value attributes are supported for each syntax".

Describe the solution you'd like

I would like [here](example.md){target="_blank" rel="noreferer noopener"} to work.

Describe alternatives you've considered

My workaround is to directly use <a href="example.html" target="_blank" rel="noreferer noopener">

lsteeger commented 3 months ago

Using: myst-parser 3.0.1

While the implementation of myst_links_external_new_tab = True addresses external links, it does not address the OP's request.

[here](example.md){target="_blank" rel="noreferer noopener"}

The OP enhancement request has not really been addressed for an internal link reference.

Please re-open this issue and consider expanding support to all link types.