Org reader: Allow image links with non-image targets
Org-Mode's own html exporter converts the following org link: [[http://example.com][https://www.haskell.org/static/img/logo.png]] to <a href="http://example.com"> <img src="https://www.haskell.org/static/img/logo.png" alt="logo.png" /> </a> but pandoc generates: <a href="http://example.com"> <a href="https://www.haskell.org/static/img/logo.png" class="uri"> https://www.haskell.org/static/img/logo.png </a> </a> which is useless. With this patch, it generates: <a href="http://example.com"> <img src="https://www.haskell.org/static/img/logo.png" alt="" /> </a>
This commit is contained in:
parent
ae3142f919
commit
2ca5101113
1 changed files with 1 additions and 1 deletions
|
@ -1106,7 +1106,7 @@ explicitOrImageLink = try $ do
|
||||||
char ']'
|
char ']'
|
||||||
return $ do
|
return $ do
|
||||||
src <- srcF
|
src <- srcF
|
||||||
if isImageFilename src && isImageFilename title
|
if isImageFilename title
|
||||||
then pure $ B.link src "" $ B.image title mempty mempty
|
then pure $ B.link src "" $ B.image title mempty mempty
|
||||||
else linkToInlinesF src =<< title'
|
else linkToInlinesF src =<< title'
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue