aboutsummaryrefslogtreecommitdiffstats
path: root/modules/indexer/code/search.go
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-12-17 22:38:54 +0800
committerGitHub <noreply@github.com>2023-12-17 14:38:54 +0000
commit20929edc9962281e35a81756d76dd1caa5741ff8 (patch)
tree138bbb9c97e609136fe83cf6e5524949218d1e72 /modules/indexer/code/search.go
parent408a4842240e7dd906e682196bd4254d6c76fcb9 (diff)
downloadgitea-20929edc9962281e35a81756d76dd1caa5741ff8.tar.gz
gitea-20929edc9962281e35a81756d76dd1caa5741ff8.zip
Add option to disable ambiguous unicode characters detection (#28454)
* Close #24483 * Close #28123 * Close #23682 * Close #23149 (maybe more)
Diffstat (limited to 'modules/indexer/code/search.go')
-rw-r--r--modules/indexer/code/search.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/indexer/code/search.go b/modules/indexer/code/search.go
index fdb468df1a..e19e22eea0 100644
--- a/modules/indexer/code/search.go
+++ b/modules/indexer/code/search.go
@@ -6,6 +6,7 @@ package code
import (
"bytes"
"context"
+ "html/template"
"strings"
"code.gitea.io/gitea/modules/highlight"
@@ -22,7 +23,7 @@ type Result struct {
Language string
Color string
LineNumbers []int
- FormattedLines string
+ FormattedLines template.HTML
}
type SearchResultLanguages = internal.SearchResultLanguages