MyST-Parser
MyST-Parser copied to clipboard
Using roles with CommonMark link formats
Context
When writing documentation, I would like to be able to use roles when resolving references in CommonMark links.
At the moment, if MyST cannot resolve a link itself, it will pass through the link text as-is using a reftype
of any
to all missing-reference
handlers.
MyST also supports using roles as an inline directive.
Proposal
I'd like it to be possible to combine the two, so that you could use Sphinx roles when declaring the target of a link.
For example, I'd like to be able to write something like:
My [Class]({py:class}`path.to.python.Class) is linked
Or use labels:
My [Class][label] is linked
[label]: {py:class}`path.to.python.Class`
Does this sound like a sensible idea?
Tasks and updates
No response
Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada: