Skip to content

Conversation

zeripath
Copy link
Contributor

Add MERMAID_MAX_SOURCE_CHARACTERS to [markup] settings
to make the maximum size of a mermaid render configurable.

Fix #16513

Signed-off-by: Andrew Thornton art27@cantab.net

Add `MERMAID_MAX_SOURCE_CHARACTERS` to `[markup]` settings
to make the maximum size of a mermaid render configurable.

Fix go-gitea#16513

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath added the type/enhancement An improvement of existing functionality label Jul 22, 2021
@zeripath zeripath added this to the 1.16.0 milestone Jul 22, 2021
@codecov-commenter
Copy link

Codecov Report

Merging #16519 (01dd8a2) into main (81091c4) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #16519      +/-   ##
==========================================
- Coverage   45.49%   45.49%   -0.01%     
==========================================
  Files         718      718              
  Lines       84317    84321       +4     
==========================================
- Hits        38363    38360       -3     
- Misses      39791    39799       +8     
+ Partials     6163     6162       -1     
Impacted Files Coverage Δ
modules/setting/markup.go 5.55% <100.00%> (+1.33%) ⬆️
modules/templates/helper.go 50.24% <100.00%> (+0.24%) ⬆️
services/pull/temp_repo.go 25.77% <0.00%> (-4.13%) ⬇️
services/pull/check.go 25.51% <0.00%> (-2.76%) ⬇️
modules/log/event.go 60.64% <0.00%> (-1.86%) ⬇️
services/pull/patch.go 54.23% <0.00%> (-1.70%) ⬇️
models/repo_list.go 77.04% <0.00%> (-0.78%) ⬇️
modules/git/blame.go 67.14% <0.00%> (+1.42%) ⬆️
modules/queue/workerpool.go 56.48% <0.00%> (+2.67%) ⬆️
models/unit.go 43.83% <0.00%> (+2.73%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 81091c4...01dd8a2. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jul 22, 2021
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jul 23, 2021
@zeripath
Copy link
Contributor Author

make lgtm work

Co-authored-by: silverwind <me@silverwind.io>
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jul 24, 2021
@techknowlogick techknowlogick merged commit f135a81 into go-gitea:main Jul 24, 2021
@zeripath zeripath deleted the fix-16513-make-mermaid-limit-configurable branch July 24, 2021 06:17
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this pull request Aug 10, 2021
* Make Mermaid.js limit configurable

Add `MERMAID_MAX_SOURCE_CHARACTERS` to `[markup]` settings
to make the maximum size of a mermaid render configurable.

Fix go-gitea#16513

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fixup! Make Mermaid.js limit configurable

* Update custom/conf/app.example.ini

Co-authored-by: silverwind <me@silverwind.io>

* Update docs/content/doc/advanced/config-cheat-sheet.en-us.md

Co-authored-by: silverwind <me@silverwind.io>

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make Mermaid JS character limit configurable
6 participants