Files
John MacFarlane 1d92024bcb HTML, Markdown writers: filter out empty class attributes.
These should not be generated by any pandoc readers, but they
might be produced programatically. Technically that's a misuse
of the AST, but since the expectation that the classes are
nonempty strigs is not encoded in the types, it can happen. This patch
limits the damage if it does, preventing invalid markdown attributes
like `{.}` from being written.

Cloess #8251.
2022-08-27 17:30:17 -07:00

278 B

% pandoc -f native -t html
Link ("",["", "", ""],[]) [Str "foo"] ("https://example.com","")
^D
<a href="https://example.com">foo</a>
% pandoc -f native -t markdown
Link ("",["", "", ""],[]) [Str "foo"] ("https://example.com","")
^D
[foo](https://example.com){}