renanlecaro / mermaid-gdocs

Mermaidsjs wrapper for gdocs.
https://mermaid-gdocs.lecaro.me/
86 stars 14 forks source link

Behavior deviation from live editor #20

Closed lgilson closed 2 years ago

lgilson commented 2 years ago

Hi,

the chars < and > are somehow special within the google docs environment. The example diagram below will wok fine in the live editor at https://mermaid-js.github.io/mermaid-live-editor/edit , but will add another </john> at the end in google docs.

Depending on the content of the < ... > sequence, the diagram fails to render at all.

sequenceDiagram
    Alice->>+John: Hello <John>, how are you?

Thanks, Laurent

renanlecaro commented 2 years ago

image Thank you for the report with clear steps to reproduce. I was using innerHTML where I should have been using textContent. Should be fixed by now