1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-06 02:27:20 +00:00

Fix remaining issues after gopls modernize formatting (#34771)

Followup https://github.com/go-gitea/gitea/pull/34751, fix all remaining
marked issues.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
silverwind
2025-06-18 20:37:49 +02:00
committed by GitHub
parent a2ae7c69da
commit 46a1d52235
7 changed files with 10 additions and 42 deletions

View File

@ -149,7 +149,7 @@ func loadMarkupFrom(rootCfg ConfigProvider) {
func newMarkupSanitizer(name string, sec ConfigSection) {
rule, ok := createMarkupSanitizerRule(name, sec)
if ok {
if after, ok0 := strings.CutPrefix(name, "sanitizer."); ok0 {
if after, found := strings.CutPrefix(name, "sanitizer."); found {
names := strings.SplitN(after, ".", 2)
name = names[0]
}