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 appears under the body tag. #4730

Open
xiaozzzi opened this issue Aug 13, 2023 · 6 comments
Open

Syntax error in text appears under the body tag. #4730

xiaozzzi opened this issue Aug 13, 2023 · 6 comments
Milestone

Comments

@xiaozzzi
Copy link

Description

I'm not sure if this is a bug, Syntax error in text appears under the body tag.

Steps to reproduce

Link to Live Editor:
https://mermaid.live/edit#pako:eNpdUMtqwzAQ_BWxZxnskpTiW4nJzaeeWnRZpE0qqoeRVocQ8u-VLRxK5zQ7u8ywcwcdDcEIVwzMKogKg0znmDyyEJ8V3Tx306RC22bSbGMQ7ztr8in6xRGTEYz5R_zBaGIguRlTHqR46YdD1w9d_yqf9O2_-ylZthrd5pbb7ly4JGr-Ngi9nzgb6Bm2qjXkaECCp_qENfW7--qggL_Jk4KxUkMXLI4VqPCop1g4ftyChpFTIQllWVuYLF4T-l1cMHzFWMcLulxnMpZjmluBW4-PX8wKaLI

gantt
    dateFormat  YYYY-MM-DD

    section A section
    Completed task            :done,    des1, 2014-01-06,2014-01-08

    section Critical tasks
    Future task in critical line        :crit1, 5d

In the last line of the above code, I use crit1 instead of crit

Screenshots

image

Code Sample

No response

Setup

  • Mermaid version:
  • Browser [edge 115.0.1901.200]

Suggested Solutions

No response

Additional Context

No response

@xiaozzzi xiaozzzi added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Aug 13, 2023
@sidharthv96 sidharthv96 added Contributor needed Status: Approved Is ready to be worked on Good first issue! P2 Status: Awaiting PR and removed Status: Triage Needs to be verified, categorized, etc labels Aug 17, 2023
@sidharthv96
Copy link
Member

sidharthv96 commented Aug 17, 2023

// packages/mermaid/src/mermaidAPI.ts

  // Draw the diagram with the renderer
  try {
    await diag.renderer.draw(text, id, version, diag);
  } catch (e) {
    errorRenderer.draw(text, id, version);
    throw e;
  }

That throw is the one we should remove/handle. As that prevents the Remove the temporary HTML element if appropriate section from running.

Depending on how it's handled, this might be a breaking change, so will have to go into next.

@sidharthv96
Copy link
Member

Anyone having the same issue with their custom integration of mermaid can use the logic from mermaid-js/mermaid-live-editor#1288 to fix it.

@JatinSainiOO7
Copy link

can i work on this issue

@Rishikesh63
Copy link

i wants to work on it

@sidharthv96 sidharthv96 added this to the v11 milestone Dec 6, 2023
@shobrook
Copy link

Has any progress been made here? Is there a way to stop that "Syntax error in text" message from showing up?

@aakashsharma7
Copy link

aakashsharma7 commented May 21, 2024

@xiaozzzi can i work on it?

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

Successfully merging a pull request may close this issue.

6 participants