Extensions should be able to define a textRenderer function to render text
**Describe the feature**
Right now, extensions can render their outputs via the renderer() function, but if we use Marked via CLI we have no way to know and account for the fact that we're rendering to CLI.
**Why is this feature necessary?**
Mainly CLI operation, but also as a way to conveniently strip the Markdown out of any piece of text.
**Describe alternatives you've considered**
Patching renderer() so that we know if the actual renderer used is TextRenderer is a bit clunky in my opinion. I didn't try, but it sounds painful, also because TextRenderer in itself can be overridden.
1 条评论