ox-html: Fix standalone hyperlinked images
commit1b42e9d8b22624c91410905b5cede56b188e21d1
authorNicolas Goaziou <n.goaziou@gmail.com>
Mon, 1 Jul 2013 20:51:26 +0000 (1 22:51 +0200)
committerNicolas Goaziou <n.goaziou@gmail.com>
Tue, 2 Jul 2013 19:06:43 +0000 (2 21:06 +0200)
tree0b81ccd420f84d6598326b64af8e0187f85749c0
parent9795d6d258fe429211c03c4a0ddda4b3f312141c
ox-html: Fix standalone hyperlinked images

* lisp/ox-html.el (org-html-inline-images): Change default value and
  remove `maybe'.
(org-html-format-inline-image): Remove functions.
(org-html--wrap-image, org-html--format-image,
org-html-inline-image-p): New functions.
(org-html-latex-environment, org-html-latex-fragment): Use new
functions.
(org-html-standalone-image-p): Use new functions.  Also remove an
unused optional argument.
(org-html-link, org-html-paragraph): Correctly export hyperlinked
images.

This patch permits the back-end to recognize links like:

  [[http://orgmode.org][http://orgmode.org/img/org-mode-unicorn-logo.png]]

as standalone, so they can get wrapped within a proper environment and
get captions.

Thanks to Kodi Arfer for reporting it.
lisp/ox-html.el