Use path separator const when building relative path

This commit is contained in:
Christian Rocha 2020-11-12 15:23:34 -05:00 committed by Christian Rocha
parent d09b225087
commit 000a0baae8

View file

@ -654,7 +654,7 @@ func localFileToMarkdown(cwd string, res gitcha.SearchResult) *markdown {
md := &markdown{
markdownType: localMarkdown,
localPath: res.Path,
displayPath: strings.Replace(res.Path, cwd+"/", "", -1), // strip absolute path
displayPath: strings.Replace(res.Path, cwd+string(os.PathSeparator), "", -1), // strip absolute path
Markdown: charm.Markdown{},
}