Skip to content

Commit

Permalink
fix link parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
lucat1 committed May 26, 2022
1 parent 986f0ef commit a601593
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion statik.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ func generate(m *minify.M, dir string, parts []string) bool {
log.Fatalf("Could not read link file: %s\n%s\n", pth, err)
}
rawStr := string(raw)
u, err := url.Parse(rawStr[:len(rawStr)-1])
u, err := url.Parse(strings.TrimSpace(rawStr))
if err != nil {
log.Fatalf("Could not parse URL in file: %s\nThe value is: %s\n%s\n", pth, raw, err)
}
Expand Down

0 comments on commit a601593

Please sign in to comment.