summaryrefslogtreecommitdiff
path: root/Pancake.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Pancake.hs')
-rw-r--r--Pancake.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Pancake.hs b/Pancake.hs
index 0c15648..20e8c43 100644
--- a/Pancake.hs
+++ b/Pancake.hs
@@ -674,8 +674,11 @@ loadDocument u' = do
-- handle relative URIs
(_, False, ((cur, _):_, _)) -> relativeTo u' cur
_ -> u'
+ uScheme = case uriScheme u of
+ [] -> "unknown"
+ (_:s) -> s
cmd = maybe (defaultCommand $ conf st) id $
- M.lookup (init $ uriScheme u) (commands $ conf st)
+ M.lookup uScheme (commands $ conf st)
ext = case takeExtension $ uriPath u of
('.':xs) -> map toLower xs
other -> other