diff options
author | Eric Schulte <schulte.eric@gmail.com> | 2013-05-20 18:15:05 -0600 |
---|---|---|
committer | Eric Schulte <schulte.eric@gmail.com> | 2013-05-21 06:42:14 -0600 |
commit | 6ebc8c8561e3133d17fb54fcf066fd0ebdc6b1f8 (patch) | |
tree | e05f2c8ea17e947daf23e47daacc287952de2533 | |
parent | 832c6fd728bee410f6d9e78252761d3852c1947a (diff) | |
download | org-mode-6ebc8c8561e3133d17fb54fcf066fd0ebdc6b1f8.tar.gz |
export inline svg images with htmlize
-rw-r--r-- | contrib/lisp/htmlize.el | 10 |
1 files 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 "<img src=\"data:image/%s;base64,%s\"%s />" - (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 "<img src=\"data:image/%s;base64,%s\"%s />" + (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) |