Improve parsing logic

This commit is contained in:
Valentin Brandl 2019-07-29 22:34:40 +02:00
parent 62062e5dfb
commit b56eb1ba61
No known key found for this signature in database
GPG Key ID: 30D341DD34118D7D

View File

@ -14,8 +14,7 @@ parseUrl url =
|> Maybe.andThen
(\( ( ( ( ( prov, user ), repo ), separator ), gitref ), file ) ->
if
List.isEmpty file
|| (List.head file |> Maybe.map String.isEmpty |> Maybe.withDefault False)
(List.head file |> Maybe.map String.isEmpty |> Maybe.withDefault True)
|| (separator /= pathSeparator prov)
then
Nothing