Mermaid-Chart / issue-tracker

Other
7 stars 1 forks source link

Generative AI suggestions produces invalid mermaid markup/syntax via quote entity #23

Open jediwarpraptor opened 9 months ago

jediwarpraptor commented 9 months ago

Describe the bug The Generative AI suggestions produce invalid mermaid markup/syntax

To Reproduce Steps to reproduce the behavior:

  1. Go to new AI chart or new chart with a very simple design
  2. A --> B --> C
  3. Click on Robot (AI) icon
  4. Type the following text "Contain nodes A and B inside of a subgraph labeled This is a subgraph"
  5. System generates snippet with HTML Entity quotes "
  6. Click on Use (or click on Copy and then Paste into diagram)

Expected behavior Chart is updated with correct syntax that encloses the first 2 nodes in a subgraph box

Actual Behavior System updates mermaid syntax but the included HTML entity escaped quotes are not recognized and cause an error

Screenshots image

Desktop (please complete the following information):

Additional context This happens with pretty much every AI-generated set of code and renders the feature essentially useless for most use-cases.

pbrolin47 commented 9 months ago

Thank you for the input. We are working on this issue.