thomiceli / opengist

Self-hosted pastebin powered by Git, open-source alternative to Github Gist.
https://demo.opengist.io
GNU Affero General Public License v3.0
1.52k stars 76 forks source link

Mermaid diagram causing syntax error #256

Closed stigi closed 2 months ago

stigi commented 2 months ago

Mermaid support was added in #96 and it's working in the global feed.

It doesn't work on the individual gist page though. Example: https://demo.opengist.io/stigi/53ccad130f6f4cc3b8d687af5209b2e3

CleanShot 2024-04-24 at 09 09 26@2x

Here's what the same gist looks like in the feed:

CleanShot 2024-04-24 at 09 09 49@2x

Content of the gist:

```mermaid
  graph TD;
      A-->B;
      A-->C;
      B-->D;
      C-->D;
```