You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attributes are a common Markdown syntax extension, e.g. {#id .class value=key}, which I think might be useful in MyST.
At a block-level, I think this would be relatively simple to implement in https://github.com/executablebooks/MyST-Parser, since they would essentially follow the same rules/logic as targets, e.g.
(target)=
# header
would be equivalent to
{#target}
# header
But then extra logic could also be added, to propagate classes as well as identifiers (for now we would ignore key/values), e.g.
{#target .class1 .class2}
# header
Would relate to HTML like
<h1id="target" class="class1 class2">header</h1>
another place they could be added, is for defining role options, e.g. {name}`content`{#id .class key=value}
Relevant links:
Attributes are a common Markdown syntax extension, e.g.
{#id .class value=key}
, which I think might be useful in MyST.At a block-level, I think this would be relatively simple to implement in https://github.com/executablebooks/MyST-Parser, since they would essentially follow the same rules/logic as targets, e.g.
(target)= # header
would be equivalent to
{#target} # header
But then extra logic could also be added, to propagate classes as well as identifiers (for now we would ignore key/values), e.g.
{#target .class1 .class2} # header
Would relate to HTML like
another place they could be added, is for defining role options, e.g.
{name}`content`{#id .class key=value}
The problem here, though, is that docutils roles syntax does not support options.
Although it is of note, that the role functions themselves, do actually accept an
options
key-word: https://github.com/live-clones/docutils/blob/48bb76093b4ba83654b2f2c86e7c52c4bb39c63b/docutils/docutils/parsers/rst/roles.py#L197-L211The text was updated successfully, but these errors were encountered: