fix: glow URL

closes #464
This commit is contained in:
Carlos Alexandro Becker 2024-07-11 12:02:03 -03:00
parent c356273a76
commit 247c707b25
No known key found for this signature in database

View file

@ -31,7 +31,6 @@ var (
CommitSHA = ""
readmeNames = []string{"README.md", "README", "Readme.md", "Readme", "readme.md", "readme"}
readmeBranches = []string{"main", "master"}
configFile string
pager bool
style string
@ -75,8 +74,9 @@ func sourceFromArg(arg string) (*source, error) {
// a GitHub or GitLab URL (even without the protocol):
src, err := readmeURL(arg)
if src != nil || err != nil {
return src, err
if src != nil && err == nil {
// if there's an error, try next methods...
return src, nil
}
// HTTP(S) URLs: