diff --git a/routers/web/repo/resource.go b/routers/web/repo/resource.go index b056c70048..29fa57f164 100644 --- a/routers/web/repo/resource.go +++ b/routers/web/repo/resource.go @@ -49,16 +49,16 @@ func GetRenderedResourcesWithSearchLinks(ctx *context.Context, repo interface{}, var resourceName string var searchQS string - for _, matches := range resourceNamesMatches { - resourceName = matches[1] + for _, resourceNameMatches := range resourceNamesMatches { + resourceName = resourceNameMatches[1] searchQS = strings.ReplaceAll(resourceName, " ", "+") resourceSubstitutionPattern := fmt.Sprintf( - `- \[ \] %s [найти](/explore/%s?tab=&q=%s)`, + `- [ ] %s [найти](/explore/%s?tab=&q=%s)`, resourceName, strings.ToLower(fieldName), searchQS) - resourcesWithSafeURLs = strings.Replace(resourcesWithSafeURLs, resourceName, resourceSubstitutionPattern, -1) + resourcesWithSafeURLs = strings.Replace(resourcesWithSafeURLs, resourceNameMatches[0], resourceSubstitutionPattern, -1) } var renderedResourcesWithSafeURLs string