mirror of https://github.com/yjwen/org-reveal.git
Merge pull request #18 from legoscia/fragment-image
Handle standalone images as fragmented content. Thanks for Magnus's codes.
This commit is contained in:
commit
4a7a643396
10
ox-reveal.el
10
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 "<p%s>\n%s</p>"
|
||||
(if-format " class=\"fragment %s\""
|
||||
(org-export-read-attribute :attr_reveal paragraph :frag))
|
||||
|
|
Loading…
Reference in New Issue