git.iko.soy/typeable/pandoc
on master help sign in
Make protocol-relative URIs work again.

Closes #2737.

commitf2bd6fd37ce6b6dfc0c382fefd3cecde57951740 authorJohn MacFarlane <jgm@berkeley.edu> dateTue 23 Feb 2016, 21:58 (11 years ago) parent0180807
1 file changed+4−2
src/Text/Pandoc/Shared.hs+4−2
src/Text/Pandoc/Shared.hs+4−2
@@ -892,8 +892,10 @@ readDataFileUTF8 userDir fname =
892892parseURIReference' :: String -> Maybe URI
893893parseURIReference' s =
894894 case parseURIReference s of
895− Just u | length (uriScheme u) > 2 -> Just u
896− _ -> Nothing
895+ Just u
896+ | length (uriScheme u) > 2 -> Just u
897+ | null (uriScheme u) -> Just u -- protocol-relative
898+ _ -> Nothing
897899
898900-- | Fetch an image or other item from the local filesystem or the net.
899901-- Returns raw content and maybe mime type.