mermaidjs / mermaid-live-editor

Location has moved to https://github.com/mermaid-js/mermaid-live-editor
https://mermaidjs.github.io/mermaid-live-editor/
MIT License
980 stars 181 forks source link

Adding a question mark in some cases will delete code following it and break rendering #5

Closed marcoelia closed 7 years ago

marcoelia commented 7 years ago

For example this is fine:

graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
C -->|One| D[Laptop]
C -->|Two| E[iPhone?]
C -->|Three| F[Car]
C -->|Four| G[Cookies]
C -->|Five| H[Cake]

Note the ? in iPhone

This next graph below breaks. Worse, If you have the above and then add a ? after Cookies the code after it goes away:


graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
C -->|One| D[Laptop]
C -->|Two| E[iPhone?]
C -->|Three| F[Car]
C -->|Four| G[Cookies]
C -->|Five| H[Cake]

Tried in Chrome and Firefox.

tylerlong commented 7 years ago

Maybe the same issues as https://github.com/mermaidjs/mermaid-live-editor/issues/4

tylerlong commented 7 years ago

Fixed

marcoelia commented 7 years ago

Thanks