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

[BUG] Mermaid Frontmatter and Directive Style Customization Not Working in Version 8.14 #2042

Open
toumakawabe opened this issue Sep 9, 2024 · 4 comments
Assignees
Labels

Comments

@toumakawabe
Copy link

Describe the bug
In version 8.14 of the Markdown Preview Enhanced extension, I've encountered an issue with Mermaid frontmatter and directive style customization. Specifically, nested configurations within the frontmatter and directive are not functioning as expected.

Environment

  • OS: Windows 10
  • VSCode: 1.93.0
  • Markdown Preview Enhanced: 0.8.14

To Reproduce
Steps to reproduce the behavior:

  1. Create a Markdown file with a Mermaid diagram.
  2. Add frontmatter or use directives to define custom styles for the diagram.
  3. Notice that the nested configuration does not apply, and the diagram renders with default styling instead.

Expected behavior
Both frontmatter and directive customizations, including nested configurations, should apply the specified styles correctly to the Mermaid diagram.

Markdown file
test.md

Screenshots
20240909

Additional context
This issue seems to have been introduced in version 8.14, as the same configuration worked correctly in previous versions. Any guidance on how to resolve this issue, or an upcoming fix, would be greatly appreciated.

Thank you for your attention to this matter!

@shd101wyy
Copy link
Owner

Hmm I just tried and it worked for me though:

image

The extension 0.8.14 updated the mermaid.js to the latest version 11.1.1

Maybe there is some change to the mermaid that broke yours?

@toumakawabe
Copy link
Author

Hi,

Thank you so much for your prompt reply and for looking into this issue.

After further investigation, I realized that my initial report was incorrect. The problem is not with the nested configurations in the frontmatter but rather with the configuration for the flowchart. Specifically, it seems that settings such as curve: step are not being applied in version 0.8.14, while they were working correctly in version 0.8.13.

Here’s an example of my configuration:

\```mermaid
---
title: version 0.8.14
config:
  theme: base
  themeVariables:
    primaryColor: "#00ff00"
  flowchart:
    curve: step
---
flowchart
  1-->2
  1-->3
\```

test2
test1

In version 0.8.14, the curve: step setting does not seem to take effect, but when I switch back to version 0.8.13, it works as expected.

I apologize for the confusion in my initial report, and I appreciate any further insights you may have on this issue.

Thank you for your time and help!

@shd101wyy
Copy link
Owner

@toumakawabe
Copy link
Author

Thank you for confirming the issue and for pointing me in the right direction. I will go ahead and report this problem to the Mermaid.js team as you suggested.

Thanks again for your help and quick responses!

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

No branches or pull requests

2 participants