aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2020-06-20 18:14:18 +0200
committerAlbert Krewinkel <albert@zeitkraut.de>2020-06-20 18:14:18 +0200
commitf5d7d41cbdf02bdca04115bbe527b3a58ff67ea5 (patch)
tree734712a02aed3d970c15bf810af4833d0053eb77 /src
parentb907d25fe43e2b7b9ecfe50c65b2d1f85c079d52 (diff)
downloadpandoc-f5d7d41cbdf02bdca04115bbe527b3a58ff67ea5.tar.gz
Recognize images with uppercase extensions
Fixes: #6472
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/Org/Shared.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Org/Shared.hs b/src/Text/Pandoc/Readers/Org/Shared.hs
index 7ddf3738f..3934be6e1 100644
--- a/src/Text/Pandoc/Readers/Org/Shared.hs
+++ b/src/Text/Pandoc/Readers/Org/Shared.hs
@@ -26,7 +26,8 @@ import Text.Pandoc.Shared (elemText)
isImageFilename :: Text -> Bool
isImageFilename fp = hasImageExtension && (isValid (T.unpack fp) || isKnownProtocolUri)
where
- hasImageExtension = takeExtension (T.unpack fp) `elem` imageExtensions
+ hasImageExtension = takeExtension (T.unpack $ T.toLower fp)
+ `elem` imageExtensions
isKnownProtocolUri = any (\x -> (x <> "://") `T.isPrefixOf` fp) protocols
imageExtensions = [ ".jpeg", ".jpg", ".png", ".gif", ".svg" ]