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

Mermaid breaks after v3.0.0-alpha.35 #3236

Closed
87xie opened this issue Sep 12, 2024 · 3 comments
Closed

Mermaid breaks after v3.0.0-alpha.35 #3236

87xie opened this issue Sep 12, 2024 · 3 comments
Labels
bug Something isn't working upstream

Comments

@87xie
Copy link
Contributor

87xie commented Sep 12, 2024

Description

I tried migrating my blog to v4.0.0-app-router and found that the Mermaid diagrams were not displaying. After comparing versions, I discovered that the issue could also be reproduced in v3 alpha:

The error started appearing in v3.0.0-alpha.35. I checked the lock file, and

  • in v3.0.0-alpha.35 version of @theguild/remark-mermaid was v0.1.2.
  • In v3.0.0-alpha.34, the diagrams are displayed correctly, and the version of @theguild/remark-mermaid was v0.0.7.

I’m not sure about the actual cause of the error, I hope the information provided above is helpful.

Additionally, I’d like to ask, what is the preferred method for providing feedback on v4? Should I open a discussion or leave a comment on a specific issue?

@dimaMachina
Copy link
Collaborator

dimaMachina commented Sep 12, 2024

About Mermaid, can you try to patch this line (and see if it helps for you?)

https://github.com/the-guild-org/docs/blob/0362d4f5f262b8e9e210ec9102f66aeffeb17245/packages/remark-mermaid/src/index.ts#L21

to change import path to nextra/components (I think we need enhance this remark plugin to pass importPath as remark plugin option)

and about v4 feedback whatever works for you, maybe in original GitHub issue, so people who subscribed will see it as well

@dimaMachina dimaMachina added the bug Something isn't working label Sep 12, 2024
@87xie
Copy link
Contributor Author

87xie commented Sep 14, 2024

The error message can also be seen here.

I patched the mermaid element ast back to the version before this pull request, and it is rendering correctly. It seems the difference is that the chart prop of <Mermaid /> retains the \n.

@dimaMachina
Copy link
Collaborator

fixed in @theguild/[email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream
Projects
None yet
Development

No branches or pull requests

2 participants