Merge pull request #18 from legoscia/fragment-image

Handle standalone images as fragmented content.
Thanks for Magnus's codes.
This commit is contained in:
Yujie Wen 2013-10-03 23:09:47 -07:00
commit 4a7a643396
1 changed files with 9 additions and 1 deletions

View File

@ -597,7 +597,15 @@ the plist used as a communication channel."
contents)
((org-html-standalone-image-p paragraph info)
;; standalone image
contents)
(let ((frag (org-export-read-attribute :attr_reveal paragraph :frag)))
(if frag
(progn
;; This is ugly; need to update if the output from
;; org-html-format-inline-image changes.
(unless (string-match "class=\"figure\"" contents)
(error "Unexpected HTML output for image!"))
(replace-match (concat "class=\"figure fragment " frag " \"") t t contents))
contents)))
(t (format "<p%s>\n%s</p>"
(if-format " class=\"fragment %s\""
(org-export-read-attribute :attr_reveal paragraph :frag))