mirror of
https://github.com/charmbracelet/glow
synced 2024-11-10 06:04:18 +00:00
parent
c356273a76
commit
247c707b25
1 changed files with 3 additions and 3 deletions
6
main.go
6
main.go
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue