From 05f5c04461dc97880e23295531c64a6bc156143e Mon Sep 17 00:00:00 2001 From: Artur Galyamov Date: Fri, 16 Sep 2022 22:00:15 +0500 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D1=8F?= =?UTF-8?q?=D0=BB=D0=BE=D1=81=D1=8C=20=D0=BB=D0=B8=D1=88=D0=BD=D0=B5=D0=B3?= =?UTF-8?q?=D0=BE=20=D0=B2=20=D1=81=D1=82=D1=80=D0=BE=D0=BA=D1=83=20=D0=BE?= =?UTF-8?q?=D0=BF=D0=B8=D1=81=D0=B0=D0=BD=D0=B8=D1=8F=20=D1=80=D0=B5=D1=81?= =?UTF-8?q?=D1=83=D1=80=D1=81=D0=B0=20#65?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routers/web/repo/resource.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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