diff options
| author | Mirek Kratochvil <miroslav.kratochvil@uni.lu> | 2023-06-13 15:53:01 +0200 |
|---|---|---|
| committer | Mirek Kratochvil <miroslav.kratochvil@uni.lu> | 2023-06-13 15:53:01 +0200 |
| commit | c84dcab7a3ced4264da7ab317c2d96e545d5deed (patch) | |
| tree | a2db09c69fa785f849afb539e27be9e1450e1aec /Utils.hs | |
| parent | 3c197503380ca36c2284a8640b73eb1f6ad5bc41 (diff) | |
| download | reploy-c84dcab7a3ced4264da7ab317c2d96e545d5deed.tar.gz reploy-c84dcab7a3ced4264da7ab317c2d96e545d5deed.tar.bz2 | |
improve link rendering
Diffstat (limited to 'Utils.hs')
| -rw-r--r-- | Utils.hs | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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 (== '/') |
