mirror of
https://github.com/charmbracelet/glow
synced 2024-11-10 06:04:18 +00:00
Don't handle filenames with a colon in it as http(s) url
This commit is contained in:
parent
30d37a1eeb
commit
7f359969b7
1 changed files with 1 additions and 1 deletions
2
main.go
2
main.go
|
@ -73,7 +73,7 @@ func sourceFromArg(arg string) (*source, error) {
|
|||
}
|
||||
|
||||
// HTTP(S) URLs:
|
||||
if u, err := url.ParseRequestURI(arg); err == nil {
|
||||
if u, err := url.ParseRequestURI(arg); err == nil && strings.Contains(arg, "://") {
|
||||
if u.Scheme != "" {
|
||||
if u.Scheme != "http" && u.Scheme != "https" {
|
||||
return nil, fmt.Errorf("%s is not a supported protocol", u.Scheme)
|
||||
|
|
Loading…
Reference in a new issue