1
0
Fork 0
forked from forgejo/forgejo

Add option to disable ambiguous unicode characters detection (#28454) (#28499)

Backport #28454 (the only conflict is caused by some comments)

* Close #24483
* Close #28123
* Close #23682
* Close #23149

(cherry picked from commit a3f403f438)

Conflicts:
	modules/setting/ui.go
	trivial context conflict
This commit is contained in:
wxiaoguang 2023-12-18 12:20:37 +08:00 committed by Earl Warren
parent c5ac659d1b
commit cd5a0ec1c8
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
17 changed files with 112 additions and 148 deletions

View file

@ -87,7 +87,7 @@ func Render(ctx *markup.RenderContext, input io.Reader, output io.Writer) error
}
lexer = chroma.Coalesce(lexer)
if _, err := w.WriteString(highlight.CodeFromLexer(lexer, source)); err != nil {
if _, err := w.WriteString(string(highlight.CodeFromLexer(lexer, source))); err != nil {
return ""
}
}