-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Mermaid.js default character limit is too low #32015
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
But this is configurable. |
Is there a reason to keep the default value different from what the creators of mermaid.js intended? |
I don't know why, but I found this: #16513 (comment) |
Looks like there was no limit a few years ago: mermaid-js/mermaid@4ad354a |
I also checked out GitLab's original implementation of the character limit that was mentioned in your linked comment. It is just supposed to defer rendering of larger graphs so it doesn't slow down the initial page load. There is no hard limit that denies rendering them altogether like Gitea currently handles this. And from my limited testing on GitHub, they don't even seem to have any limit or it is not triggered easily. In summary, Gitea's current implementation and default value try to solve one issue by creating an entirely new one: Not being able to render a graph. |
Sure: Set MERMAID_MAX_SOURCE_CHARACTERS to 50000 #34152 |
Fix go-gitea#32015 (cherry picked from commit f8edc29)
Description
Mermaid.js has a default
maxTextSize
of 50000:https://github.com/mermaid-js/mermaid/blob/dd0304387e85fc57a9ebb666f89ef788c012c2c5/packages/mermaid/src/schemas/config.schema.yaml#L95-L98
Can we increase
gitea/modules/setting/markup.go
Line 64 in a323a82
to the same value?
Gitea Version
1.22.2
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
Database
None
The text was updated successfully, but these errors were encountered: