git.iko.soy/typeable/pandoc
on master help sign in
Merge branch 'master' of https://github.com/rootzlevel/pandoc into rootzlevel-master
2d2e4c9John MacFarlane
src/Text/Pandoc/Readers/Org.hs+1−1
@@ -1093,7 +1093,7 @@ explicitOrImageLink = try $ do
1093 char ']'
1093 char ']'
1094 alt <- internalLink src title'
1094 alt <- internalLink src title'
1095 return $
1095 return $
1096− (if isImageFilename src && isImageFilename title
1096+ (if isImageFilename title
1097 then B.link src "" $ B.image title mempty mempty
1097 then B.link src "" $ B.image title mempty mempty
1098 else fromMaybe alt (linkToInlines src title'))
1098 else fromMaybe alt (linkToInlines src title'))
1099
1099
tests/Tests/Readers/Org.hs+4
@@ -216,6 +216,10 @@ tests =
216 "[[sunset.png][dusk.svg]]" =?>
216 "[[sunset.png][dusk.svg]]" =?>
217 (para $ link "sunset.png" "" (image "dusk.svg" "" ""))
217 (para $ link "sunset.png" "" (image "dusk.svg" "" ""))
218
218
219+ , "Image link with non-image target" =:
220+ "[[http://example.com][logo.png]]" =?>
221+ (para $ link "http://example.com" "" (image "logo.png" "" ""))
222+
219 , "Plain link" =:
223 , "Plain link" =:
220 "Posts on http://zeitlens.com/ can be funny at times." =?>
224 "Posts on http://zeitlens.com/ can be funny at times." =?>
221 (para $ spcSep [ "Posts", "on"
225 (para $ spcSep [ "Posts", "on"