Closed akaleeroy closed 2 years ago
Yes, it is as good of an example as you can get with the current architecture.
Personally, I'd like to have markdown AST, transform it to HTML DOM and serialize that. Then you'd be able to write a plugin to add epub:type
attribute between these two steps. We don't have that, so extending renderer is a reasonable approach.
added your example to README, thank you
Regarding #28 what would be a good example to add to the README? I've used the following to customize footnotes for EPUB ebooks:
Since renderers return a string this just does string replacement to add required attributes to the markup.
Reference: Markdown-It Architecture > Renderer
Seems to have worked, but I'm not sure if this is a good example to add. Which is why I opened this issue.