Pandoc filters let you do a lot of things provided you stick to the defined types. If you want to add new types of element, like this does, then the only practical way is a fork.
(except for really simple cases)
(except for really simple cases)
I also became super-convinced that some level of AST change was necessary to keep things sane, and since I wasn't able to use the existing Math and Image types anyways (they're not attributed), I ultimately just started a new AST type package namespace called "Scholdoc". Everything just evolved from there.
Markdown syntax for generic containers (Div and Span) hasn't been implemented yet but the discussion is fairly mature now: