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