-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Add mermaid JS renderer #12334
Add mermaid JS renderer #12334
Conversation
For feature parity with GitLab. Tested in files, issues, wiki, editor. arc-green only does an inversion because the renderer seems to like to render white backgrounds on boxes. Ref: go-gitea#3340 Fixes: go-gitea#12307
The only real downside I see with this is that the library is a bit heavy at 1.4MiB so will add a bit to our webpack build time. The code itself is rather trivial and should not require much to maintain. |
Took a few hints from the gitlab implementation. Now renders without a border and with neutral theme. Updated screenshots. |
This may break the user's customerized mermaid rendering. We should have a warnning for that. |
🚀 |
I don't think it will. Our script will likely run before the user-supplied one and then their script is essentially a noop because it won't find any matching elements. A mention in the release notes about the necessary customization removal would be nice. |
Looks like editor is now broken with error:
|
It does work for me https://try.gitea.io/silverwind/symlink-test/issues/7. Try refreshing the page a few times? There's still a unresolved issue with bad serviceworker cache which I'll soon look into. |
Ah, misread. What exactly do you do to trigger that error? |
Just edit file in repository (I was trying to edit README.md) |
nevermind, now it does work 😅 |
Yeah, serviceworker strikes again. I plan to experiment with |
For feature parity with GitLab. Tested in files, issues, wiki, editor. arc-green only does an inversion because the renderer seems to like to render white backgrounds on boxes.
Ref: #3340
Fixes: #12307
Previews:
Sample for testing: