From 4611b177def45bf23c2cfb1caf0b12baa5e0e91b Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Mon, 20 May 2013 18:15:05 -0600 Subject: [PATCH] export inline svg images with htmlize --- contrib/lisp/htmlize.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/contrib/lisp/htmlize.el b/contrib/lisp/htmlize.el index c03d605..3bf5949 100644 --- a/contrib/lisp/htmlize.el +++ b/contrib/lisp/htmlize.el @@ -601,10 +601,12 @@ list." (htmlize-attr-escape (file-relative-name file)) alt-attr))) ((plist-get imgprops :data) - (format "" - (or (plist-get imgprops :type) "") - (base64-encode-string (plist-get imgprops :data)) - alt-attr))))) + (if (equalp (plist-get imgprops :type) 'svg) + (plist-get imgprops :data) + (format "" + (or (plist-get imgprops :type) "") + (base64-encode-string (plist-get imgprops :data)) + alt-attr)))))) (defconst htmlize-ellipsis "...") (put-text-property 0 (length htmlize-ellipsis) 'htmlize-ellipsis t htmlize-ellipsis) -- 1.8.2.3