From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: patch for htmlize.el Date: Mon, 20 May 2013 18:16:08 -0600 Message-ID: <878v39ur07.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:60061) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UeaFx-0007ya-Bo for emacs-orgmode@gnu.org; Mon, 20 May 2013 20:16:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UeaFw-000538-8S for emacs-orgmode@gnu.org; Mon, 20 May 2013 20:16:45 -0400 Received: from mail-pb0-x22b.google.com ([2607:f8b0:400e:c01::22b]:32797) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UeaFw-00052z-1d for emacs-orgmode@gnu.org; Mon, 20 May 2013 20:16:44 -0400 Received: by mail-pb0-f43.google.com with SMTP id ma3so32620pbc.30 for ; Mon, 20 May 2013 17:16:43 -0700 (PDT) Received: from bagel (c-174-56-50-60.hsd1.nm.comcast.net. [174.56.50.60]) by mx.google.com with ESMTPSA id sv4sm608979pab.10.2013.05.20.17.16.40 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 20 May 2013 17:16:42 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode Mailing List --=-=-= Content-Type: text/plain Hi, I'd like to commit the following patch which improves htmlize's handling of svg image overlays. I couldn't find an upstream for htmlize, is it appropriate to patch htmlize in the Org-mode source tree? Thanks, --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-export-inline-svg-images-with-htmlize.patch >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 --=-=-= Content-Type: text/plain -- Eric Schulte http://cs.unm.edu/~eschulte --=-=-=--