Open rowanc1 opened 1 year ago
address the conflict with
(targets)=
A very quick thing I noted recently, since attributes only recognize (\W_:-)
(https://github.com/jgm/djot.js/blob/8544a3646add6640ef647c61d629c5d4978207a7/src/attributes.ts#L97)
(target/forwardslash)=
# This works
{#target/forwardslash}
# This does not
which is a bit of an issue, at least for back-compatibility, because I at least have used /
in a lot of target names 😅
There has been a lot of discussion dating back to 2019/2020 on how to add options to roles, and easier/faster ways to add options to directives.
For example:
There is recent work in the python parser on bringing in djot/pandoc style inline & block attributes. Which is a really helpful and standardized concept.
I think that we should aim to discuss how we adopt this in the myst-spec and across all myst projects. There is some initial work at implementations here:
I think from a MEP perspective we could aim to add block & inline attributes, address the conflict with
(targets)=
. I think a future MEP could aim to resolve how directives and roles integrate with this feature. For example, after the inclusion of block syntax, we would support something like:However, there are many different ways we could combine these as we modify MyST syntax to resolve some of the redundancy that this allows.
Suggested MEPs: 1) add block syntax (e.g. above any element, how they combine, etc.) 2) add inline role attributes syntax (e.g. only on images, spans, code etc, not any words), builds on (1) 3) discuss how to rationalize the new syntax with directives, engaging the djot community (ideally) along the way
@chrisjsewell can you add any other context/pointers please?!