We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9451a5d commit 5c29ff5Copy full SHA for 5c29ff5
pkg/npm/search.go
@@ -2,6 +2,7 @@ package npm
2
3
import (
4
"net/http"
5
+ "strings"
6
"time"
7
8
"github.com/PuerkitoBio/goquery"
@@ -28,6 +29,8 @@ func SearchByScrape(name string) ([]model.NPMPackageResult, error) {
28
29
description := section.Find("p").Text()
30
if len(description) == 0 {
31
description = model.NoDescription
32
+ } else {
33
+ description = strings.Trim(description, " \n\t")
34
}
35
36
result = append(result, model.NPMPackageResult{
0 commit comments