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

"syntax error in text" Mermaid 10.4.0 #337

Open
rjaus opened this issue Sep 18, 2023 · 4 comments
Open

"syntax error in text" Mermaid 10.4.0 #337

rjaus opened this issue Sep 18, 2023 · 4 comments

Comments

@rjaus
Copy link

rjaus commented Sep 18, 2023

Problem:
"Syntax error in text mermaid version 10.4.0"
image

Occurring in PDF & PNG export. (haven't tested any other formats).

Using as VS Code extension.

Mermaid syntax in question: (as taken from example docs):

stateDiagram
    [*] --> First
    state First {
        [*] --> second
        second --> [*]
    }

But it's happening on every sequenceDiagram as well.

@rjaus
Copy link
Author

rjaus commented Sep 18, 2023

stateDiagram
    [*] --> First
    state First {
        [*] --> second
        second --> [*]
    }

@cwardBarr
Copy link

It works if you change your mermaid server to point to a previous version of mermaid. I found this solution in an older thread.

Find your Markdown PDF extension in the extensions tab, then click the gear. Choose Extension Settings. In the page that opens, find "Mermaid Server" and update the server to the test shown below which references a 9.0.1 version:

https://unpkg.com/mermaid@9.0.1/dist/mermaid.min.js

@rjaus
Copy link
Author

rjaus commented Oct 2, 2023

Thank you, that worked.

I updated to the latest version of the extension, and it now seems to output the mermaid graphs as their markdown syntax (unrendered).

Your solution worked with the latest version.

@LarsOevlisen
Copy link

Switching between versions manually, the most recent mermaid version that worked for me when testing was:

https://cdn.jsdelivr.net/npm/mermaid@10.4.0/dist/mermaid.min.js

(https://github.com/mermaid-js/mermaid/releases).

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