export inline svg images with htmlize

This commit is contained in:
Eric Schulte 2013-05-20 18:15:05 -06:00
parent 832c6fd728
commit 6ebc8c8561
1 changed files with 6 additions and 4 deletions

View File

@ -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)