diff options
author | Albert Krewinkel <tarleb@moltkeplatz.de> | 2014-04-19 11:25:39 +0200 |
---|---|---|
committer | Albert Krewinkel <tarleb@moltkeplatz.de> | 2014-04-19 11:25:39 +0200 |
commit | a69416091ba035ab1661ff306ef3e51fd926488b (patch) | |
tree | 7671d3fc4e3bb596f3f4cbf9c1b48fc99fa32d1d /src/Text | |
parent | 6ded3d41d94c1e90d1d30a1f99ddad62e62d9ce6 (diff) | |
download | pandoc-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')
-rw-r--r-- | src/Text/Pandoc/Readers/Org.hs | 4 |
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" ] |