Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support mermaid charts #22

Open
Ladvace opened this issue Aug 28, 2023 · 2 comments
Open

Support mermaid charts #22

Ladvace opened this issue Aug 28, 2023 · 2 comments

Comments

@Ladvace
Copy link

Ladvace commented Aug 28, 2023

is there a way to integrate the mermaid charts in the markdown?

@imkunet
Copy link

imkunet commented Mar 25, 2024

Hi there. I was writing a demonstration on how to do this using rehype-mermaid but then tragedy struck again. This line in this project will (for now) make this task impossible (or at least harder) when using this package.

const hastNode = processor.runSync(processor.parse(file), file);

The attempt at making it work (you can see it throw in console executing the aforementioned line): https://stackblitz.com/edit/solidjs-template-h3p7cj?file=src%2FApp.tsx

For reference, the error:

dev.jsx:9760 Uncaught Error: `runSync` finished async. Use `run` instead
    at assertDone (dev.jsx:9760:11)
    at Function.runSync (dev.jsx:9557:5)
    at Object.fn (dev.jsx:10562:33)
    at runComputation (dev.jsx:6359:23)
    at updateComputation (dev.jsx:6342:3)
    at createMemo (dev.jsx:6188:5)
    at SolidMarkdown (dev.jsx:10551:20)
    at chunk-JG2I5HKG.js?v=be5824c1:633:14
    at untrack (chunk-JG2I5HKG.js?v=be5824c1:513:12)
    at Object.fn (chunk-JG2I5HKG.js?v=be5824c1:629:11)

Likely fixes?

Asynchronous magic, probably.

@andi23rosca
Copy link
Owner

I'll have to think on this, the library assumes everything will run syncrhonously
I might provide a different component for rendering async

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants