markdown-it plugin to add attributes to all rendered elements
So I can specifically target the markdown using a markdown stylesheet without interfering with some of the other code in the markdown.
$ npm i markdown-it-add-attrs
import addAttrsPlugin from 'markdown-it-add-attrs';
md.use(addAttrsPlugin, {
// This "class" attribute will be added to all markdown elements
class: 'md-doc',
});
MIT