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
*[abbr]: Abbreviation Definition
![Image with abbr in title](abbr.png){title="Image with abbr in title"}
This renders the attribute code as plain text because the Abbreviation extension modifies the text in the attribute causing it to no longer be a valid attribute list.
>>>importmarkdown>>>src='''... *[abbr]: Abbreviation Definition...... ![Image with abbr in title](abbr.png){title="Image with abbr in title"}... '''>>>markdown.markdown(src, extensions=['abbr', 'attr_list'])
'<p><img alt="Image with abbr in title" src="abbr.png" />{title="Image with <abbr title="Abbreviation Definition">abbr</abbr> in title"}</p>'
The cause of the issue is that the abbr extension runs an inline processor while the attr_list extension runs a treeprocessor. If both extensions used the same type of processor we would just ensure they were ordered so that the attr_list processor ran first. But being different processor types, it is not so easy. Especially because we generally want inline processors to run before attr_list so that attribute lists can be applied to inline elements.
This may require use of a custom treeprocessor for the addr extension which runs later. I will have to think about that.
A new `AbbrTreeprocessor` has been introduced, which replaces the now
deprecated `AbbrInlineProcessor`. Abbreviation processing now happens
after Attribute Lists, avoiding a conflict between the two extensions.
FixesPython-Markdown#1460.
A new `AbbrTreeprocessor` has been introduced, which replaces the now
deprecated `AbbrInlineProcessor`. Abbreviation processing now happens
after Attribute Lists, avoiding a conflict between the two extensions.
Fixes#1460.
The `AbbrPreprocessor` class has been renamed to `AbbrBlockprocessor`, which
better reflects what it is. `AbbrPreprocessor` has been deprecated.
A call to `Markdown.reset()` now clears all previously defined abbreviations.
Bug description
This renders the attribute code as plain text because the Abbreviation extension modifies the text in the attribute causing it to no longer be a valid attribute list.
Reproduction
9.5.18-abbr-attr_list-conflict.zip
Steps to reproduce
abbr
andattr_list
extensionsThe text was updated successfully, but these errors were encountered: