pandoc / lua-filters

A collection of lua filters for pandoc
MIT License
600 stars 165 forks source link

Filter for adding attributes to all elements? #251

Closed mustafa0x closed 1 year ago

mustafa0x commented 1 year ago

There's a 10-year-old open feature request for this, and djot adds support, but for us still using pandoc's markdown, is there a filter that adds such a feature? Especially for lists.

jgm commented 1 year ago

This is not something that could be added by a filter; the pandoc AST does not have slots for attributes on all elements.

However, you can emulate this using commonmark_x -- see https://pandoc.org/MANUAL.html#extension-attributes