Closed RoyiAvital closed 9 months ago
OK, It seems attr_list
won't work in this case.
I wonder if there is an alternative which works similar to how attribution are applied in Quarto.
So for inline it can work like: [my text]{: .somecalss #someID}
.
Yeah, unfortunately, attr_list
doesn't work this way. There may be some Python Markdown extension out there that does something like you want, but you would need to hunt it down.
In short, attr_list
need to be applied to an element, and in your case there isn't one to apply it to. There are some rules in how it gets applied, but sometimes it just doesn't play nice with certain extensions.
You can apply it to the entire block:
my text.
{: .somecalss #someID}
But I imagine that is not what you want.
You can apply it to situations where the text is already wrapped in an element:
**my text**{: .somecalss #someID}.
Unfortunately, it doesn't play nice with raw HTML:
<span>my text</span>{: class="foo bar"}.
Of course, plain HTML will always work.
<span class="foo bar">my text</span>
I have a MarkDown document configured as:
The output doesn't apply the class to the text. More than, that, is just appears as
my text {: class="foo bar"}.
.I am following the documentation in https://python-markdown.github.io/extensions/attr_list/.