aboutsummaryrefslogtreecommitdiff
path: root/Utils.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Utils.hs')
-rw-r--r--Utils.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Utils.hs b/Utils.hs
index ea0b1ec..4828335 100644
--- a/Utils.hs
+++ b/Utils.hs
@@ -40,3 +40,9 @@ walkURLs f = Text.Pandoc.Walk.walkM go
u' <- T.pack <$> f (T.unpack u)
pure $ Image a i (u', t)
go x = pure x
+
+hasUriScheme :: String -> String -> Bool
+hasUriScheme x = all id . zipWith (==) x . (++ ":")
+
+unAbsolute :: String -> String
+unAbsolute = dropWhile (== '/')