From c84dcab7a3ced4264da7ab317c2d96e545d5deed Mon Sep 17 00:00:00 2001 From: Mirek Kratochvil Date: Tue, 13 Jun 2023 15:53:01 +0200 Subject: improve link rendering --- Utils.hs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Utils.hs') 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 (== '/') -- cgit v1.2.3