lemmy-ui icon indicating copy to clipboard operation
lemmy-ui copied to clipboard

Adding mermaid.js support via markdown-it.

Open dessalines opened this issue 1 year ago • 2 comments

  • Fixes #2754

EDIT: nm, this doesn't work currently because the library doesn't support ESM :

Error [ERR_REQUIRE_ESM]: require() of ES Module /home/xxx/git/lemmy-ui/node_modules/.pnpm/[email protected]/node_modules/mermaid/dist/mermaid.core.mjs not supported.

dessalines avatar Oct 15 '24 19:10 dessalines

This is for some sort of diagram rendering? I would rather not add that because its pretty much out of scope, and then all other frontends and apps would also have to add support for this feature.

Nutomic avatar Oct 16 '24 08:10 Nutomic

Yep. Here's some more cool ones that hedgedoc for example supports in their markdown.

I think its fine if we have these markdown add-ons, as long as its understood that we won't maintain the libraries ourselves, and that any apps will have to do their own work supporting them. It could also be kind of a cool incentive / project for people to start adding these renderers to other platforms besides the web, like android / iOS.

dessalines avatar Oct 16 '24 14:10 dessalines

Closing as even if this were added, it adds to much bloat.

dessalines avatar Nov 06 '24 16:11 dessalines