vite-plugin-markdown icon indicating copy to clipboard operation
vite-plugin-markdown copied to clipboard

Adding option to import MD as MarkdownIt's tokens

Open Levyks opened this issue 2 years ago • 1 comments

This should be useful in case you want to implement some sort of custom renderer for the markdown.

Currently, the only way to do this would be to parse the generated html client-side with htmlparser2 or something like that, which is not ideal performance wise

Levyks avatar Aug 06 '22 16:08 Levyks

Thanks for your contribution! Can you elaborate actual usage of this feature? I'd like to learn more about what this feature solves for users in real world.

At this moment, I would be reluctant to merge this feature since:

  • Exposing MarkdownIt specific tokens despite this plugin accepts any markdown compiler
  • The feature is a bit too abstract for usage (exposing markdown's parsing result might be helpful but I doubt that is a final outcome plugin's user wants)
    • When user wanna have "tokens", probably they intend to build something different outcome using the tokens...? Then markdown or markdownIt option would work for that case I think

hmsk avatar Aug 07 '22 04:08 hmsk