mirror of
https://github.com/go-gitea/gitea
synced 2025-07-06 02:27:20 +00:00
Run gopls modernize
on codebase (#34751)
Recent modernize fixes: https://github.com/golang/tools/commits/master/gopls/internal/analysis/modernize
This commit is contained in:
@ -149,8 +149,8 @@ func loadMarkupFrom(rootCfg ConfigProvider) {
|
||||
func newMarkupSanitizer(name string, sec ConfigSection) {
|
||||
rule, ok := createMarkupSanitizerRule(name, sec)
|
||||
if ok {
|
||||
if strings.HasPrefix(name, "sanitizer.") {
|
||||
names := strings.SplitN(strings.TrimPrefix(name, "sanitizer."), ".", 2)
|
||||
if after, ok0 := strings.CutPrefix(name, "sanitizer."); ok0 {
|
||||
names := strings.SplitN(after, ".", 2)
|
||||
name = names[0]
|
||||
}
|
||||
for _, renderer := range ExternalMarkupRenderers {
|
||||
|
Reference in New Issue
Block a user