abbreviation{ title=\"Important information\" }
doesn't create any HTML element for attr_list
to use. abbreviation
is a pure string without a wrapper to target the addition of attributes. You can fix it using a span
wrapper of your own above with set attributes without using attr_list
, or any other wrapper *abbreviation*{ title=\"Important information\" }
-
Why does this work: |
Beta Was this translation helpful? Give feedback.
-
Hello @NFanoe,
<span title="Important information">
|
Beta Was this translation helpful? Give feedback.
Hello @NFanoe,
I'm not entirely sure what you're trying to do, but since you use the
title
attribute, then I'll assume you want to enable tooltips for elements.attr_list
is a Markdown extension, which adds attributes to HTML blocks generated in Markdown.:material-information-outline:{ title="Important information" }
works because thepymdownx.emoji
markdown extension generates a HTML<span>
wrapper for the icon, which later is used by theattr_list
<span>abbreviation</span>{ title="Important information" }
doesn't work, because it's a raw HTML element not passed to theattr_list
extension or any other extension, it's used as-is. You can fix it by adding your own attributes to the<s…