git.iko.soy/typeable/pandoc
on master help sign in
Merge branch 'rootzlevel-master'
commita241cf6a30916da852ea040cb4a4d8aee5279f46 authorJohn MacFarlane <jgm@berkeley.edu> dateSat 28 Mar 2015, 21:14 (12 years ago) parent27078982d2e4c9
2 files changed+5−1
src/Text/Pandoc/Readers/Org.hs+1−1 tests/Tests/Readers/Org.hs+4
src/Text/Pandoc/Readers/Org.hs+1−1
@@ -1093,7 +1093,7 @@ explicitOrImageLink = try $ do
10931093 char ']'
10941094 alt <- internalLink src title'
10951095 return $
1096− (if isImageFilename src && isImageFilename title
1096+ (if isImageFilename title
10971097 then B.link src "" $ B.image title mempty mempty
10981098 else fromMaybe alt (linkToInlines src title'))
10991099
tests/Tests/Readers/Org.hs+4
@@ -216,6 +216,10 @@ tests =
216216 "[[sunset.png][dusk.svg]]" =?>
217217 (para $ link "sunset.png" "" (image "dusk.svg" "" ""))
218218
219+ , "Image link with non-image target" =:
220+ "[[http://example.com][logo.png]]" =?>
221+ (para $ link "http://example.com" "" (image "logo.png" "" ""))
222+
219223 , "Plain link" =:
220224 "Posts on http://zeitlens.com/ can be funny at times." =?>
221225 (para $ spcSep [ "Posts", "on"