From 1acb41807f916ab93eeb455179a03e5d307b8e9b Mon Sep 17 00:00:00 2001 From: Magnus Henoch Date: Thu, 3 Oct 2013 11:03:39 +0100 Subject: [PATCH] Handle standalone images as fragmented content This now works as expected: [[./my-image.png]] --- ox-reveal.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ox-reveal.el b/ox-reveal.el index ad2948d..237f622 100644 --- a/ox-reveal.el +++ b/ox-reveal.el @@ -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 "\n%s

" (if-format " class=\"fragment %s\"" (org-export-read-attribute :attr_reveal paragraph :frag))