git.iko.soy/typeable/pandoc
on master help sign in
Org reader: Fix distinction of images and normal links
a694160Albert Krewinkel
src/Text/Pandoc/Readers/Org.hs+2−2
@@ -860,8 +860,8 @@ linkTarget = enclosed (char '[') (char ']') (noneOf "\n\r]")
860isImageFilename :: String -> Bool
860isImageFilename :: String -> Bool
861isImageFilename filename =
861isImageFilename filename =
862 any (\x -> ('.':x) `isSuffixOf` filename) imageExtensions &&
862 any (\x -> ('.':x) `isSuffixOf` filename) imageExtensions &&
863− any (\x -> (x++":") `isPrefixOf` filename) protocols ||
863+ (any (\x -> (x++":") `isPrefixOf` filename) protocols ||
864− ':' `notElem` filename
864+ ':' `notElem` filename)
865 where
865 where
866 imageExtensions = [ "jpeg" , "jpg" , "png" , "gif" , "svg" ]
866 imageExtensions = [ "jpeg" , "jpg" , "png" , "gif" , "svg" ]
867 protocols = [ "file", "http", "https" ]
867 protocols = [ "file", "http", "https" ]