I use Markdown to write my training documents, and I convert them to HTML using Pandoc.
I’d like to have a class bullet using the classic * character, and having the logo + (cool!) and – (not cool) using bullets +and -.
Currently I have no differences in the output HTML. How could I add a class depending on the bullet?
To get HTML
classattributes out of Pandoc, you have to set these attributes explicitly in the input files. This is supported only for code blocks, and does not work automatically.To get classes for lists, you need to modify Pandoc to output them.
In
src/Text/Pandoc/Writers/HTML.hs, attributes for code blocks are generated inattrsToHtml, called fromblockToHtmlorinlineToHtml.You would have to extend
unordListto generate an attribute and to callattrsToHtmlon it.(The absence of the haskell tag indicates that this might not be the solution you are looking for …)