Skip to content

Commit

Permalink
fix(search): print repo search result in original case
Browse files Browse the repository at this point in the history
Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>
  • Loading branch information
Höhl, Lukas authored and joejulian committed May 26, 2023
1 parent dee1fde commit 5b19d8e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cmd/helm/search/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,10 @@ func (i *Index) SearchLiteral(term string, threshold int) []*Result {
term = strings.ToLower(term)
buf := []*Result{}
for k, v := range i.lines {
lk := strings.ToLower(k)
lv := strings.ToLower(v)
res := strings.Index(lv, term)
if score := i.calcScore(res, lv); res != -1 && score < threshold {
parts := strings.Split(lk, verSep) // Remove version, if it is there.
parts := strings.Split(k, verSep) // Remove version, if it is there.
buf = append(buf, &Result{Name: parts[0], Score: score, Chart: i.charts[k]})
}
}
Expand Down

0 comments on commit 5b19d8e

Please sign in to comment.