1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-03-27 07:50:07 +00:00
forgejo/modules/markup
zeripath 196593e2e9
More efficiently parse shas for shaPostProcessor ()
* More efficiently parse shas for shaPostProcessor

The shaPostProcessor currently repeatedly calls git rev-parse --verify on both backends
which is fine if there is only one thing that matches a sha - however if there are
multiple things then this becomes wildly inefficient.

This PR provides functions for both backends which are much faster to use.

Fix 

* Add ShaExistCache to RenderContext

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
2021-06-21 00:39:12 +02:00
..
common Code Formats, Nits & Unused Func/Var deletions () 2021-04-09 09:40:34 +02:00
csv Refactor renders () 2021-04-19 18:25:08 -04:00
external Refactor renders () 2021-04-19 18:25:08 -04:00
markdown Fixed assert statements. () 2021-06-07 07:27:09 +02:00
mdstripper Detect full references to issues and pulls in commit messages () 2020-08-06 20:20:05 +01:00
orgmode Refactor renders () 2021-04-19 18:25:08 -04:00
html.go More efficiently parse shas for shaPostProcessor () 2021-06-21 00:39:12 +02:00
html_internal_test.go Refactor renders () 2021-04-19 18:25:08 -04:00
html_test.go Run processors on whole of text () 2021-06-17 11:35:05 +01:00
renderer.go More efficiently parse shas for shaPostProcessor () 2021-06-21 00:39:12 +02:00
renderer_test.go Refactor renders () 2021-04-19 18:25:08 -04:00
sanitizer.go issue-keyword class is being incorrectly stripped off spans () 2021-06-16 03:02:03 +02:00
sanitizer_test.go Fix data URI scramble () 2021-06-07 18:55:26 +02:00