1
0
Fork 0
forked from forgejo/forgejo

Upgrade go dependencies (#25819)

This commit is contained in:
harryzcy 2023-07-13 22:00:31 -05:00 committed by GitHub
parent b81c013057
commit c5e187c389
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 379 additions and 398 deletions

View file

@ -51,7 +51,7 @@ func (Renderer) SanitizerRules() []setting.MarkupSanitizerRule {
// Render renders orgmode rawbytes to HTML
func Render(ctx *markup.RenderContext, input io.Reader, output io.Writer) error {
htmlWriter := org.NewHTMLWriter()
htmlWriter.HighlightCodeBlock = func(source, lang string, inline bool) string {
htmlWriter.HighlightCodeBlock = func(source, lang string, inline bool, params map[string]string) string {
defer func() {
if err := recover(); err != nil {
log.Error("Panic in HighlightCodeBlock: %v\n%s", err, log.Stack(2))