mermaid-js / mermaid

Generation of diagrams like flowcharts or sequence diagrams from text in a similar manner as markdown
https://mermaid.js.org
MIT License
68.69k stars 6.07k forks source link

Large flowchart diagram failed to render on self-hosted gitea #5547

Open anubane opened 1 month ago

anubane commented 1 month ago

Description

I have created a large flowchart diagram using mermaid within markdown, which renders ok on VSCode (using Matt Bierner's Markdown Preview Mermaid Support extension). However, when I push it to my self-hosted gitea server, I get the following error message:

Mermaid source of 5397 characters exceeds the maximum allowed length of 5000.
Software Version
My gitea server version 1.21.5
Firefox version 121.0.1
Google Chrome version 121.0.6167.85
Mermaid version mermaid.83a93d40.js

Not sure about the mermaid version, though my gitea server has the above named file!

Steps to reproduce

The flowchart describes a proprietary algorithm, and as such I cannot reproduce it here. However, if any other details are needed, I can provide that.

Screenshots

image

On the rendered page, I right clicked and selected View page source, which showed the following:

image
anubane commented 1 month ago

In a markdown file, inside a mermaid diagram, we can initialize some values:

```mermaid
%%{init: {'theme': 'forest'}}%%
flowchart TB
    direction TB

    p0([start])
‎ ```

The way I have initialized the theme, is there a means to set character limit?