aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
authorAlbert Krewinkel <tarleb@moltkeplatz.de>2014-04-19 11:25:39 +0200
committerAlbert Krewinkel <tarleb@moltkeplatz.de>2014-04-19 11:25:39 +0200
commita69416091ba035ab1661ff306ef3e51fd926488b (patch)
tree7671d3fc4e3bb596f3f4cbf9c1b48fc99fa32d1d /src/Text/Pandoc/Readers
parent6ded3d41d94c1e90d1d30a1f99ddad62e62d9ce6 (diff)
downloadpandoc-a69416091ba035ab1661ff306ef3e51fd926488b.tar.gz
Org reader: Fix distinction of images and normal links
Fixed a false assumption about the precedence of (&&) vs (||).
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/Org.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Org.hs b/src/Text/Pandoc/Readers/Org.hs
index 025158060..66211b20e 100644
--- a/src/Text/Pandoc/Readers/Org.hs
+++ b/src/Text/Pandoc/Readers/Org.hs
@@ -860,8 +860,8 @@ linkTarget = enclosed (char '[') (char ']') (noneOf "\n\r]")
isImageFilename :: String -> Bool
isImageFilename filename =
any (\x -> ('.':x) `isSuffixOf` filename) imageExtensions &&
- any (\x -> (x++":") `isPrefixOf` filename) protocols ||
- ':' `notElem` filename
+ (any (\x -> (x++":") `isPrefixOf` filename) protocols ||
+ ':' `notElem` filename)
where
imageExtensions = [ "jpeg" , "jpg" , "png" , "gif" , "svg" ]
protocols = [ "file", "http", "https" ]