From 74b9a3c8cb4df9f38ce5ed5222d8550a418d5c6b Mon Sep 17 00:00:00 2001 From: Yujie Wen Date: Sat, 25 Jul 2015 22:55:53 +0800 Subject: [PATCH] Embed svg. --- ox-reveal.el | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/ox-reveal.el b/ox-reveal.el index 93e7242..c61c463 100755 --- a/ox-reveal.el +++ b/ox-reveal.el @@ -686,25 +686,35 @@ CONTENTS is nil. INFO is a plist holding contextual information." (case (intern key) (REVEAL (org-reveal-parse-keyword-value value)) (REVEAL_HTML value)))) +(defun org-reveal-embedded-svg (link) + "Embed the SVG content into Reveal HTML." + (with-temp-buffer + (insert-file-contents-literally path) + (let ((start (re-search-forward "<[ \t\n]*svg[ \t\n]")) + (end (re-search-forward "<[ \t\n]*/svg[ \t\n]*>"))) + (concat "