emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Eric Schulte <schulte.eric@gmail.com>
Cc: Org Mode Mailing List <emacs-orgmode@gnu.org>
Subject: Re: patch for htmlize.el
Date: Tue, 21 May 2013 08:49:55 +0200	[thread overview]
Message-ID: <4132A8D4-6784-4686-BF01-A72BEDFC66CC@gmail.com> (raw)
In-Reply-To: <878v39ur07.fsf@gmail.com>

Yes, that is all right at least for now, please go ahead.

Thanks!

- Carsten

On 21 mei 2013, at 02:16, Eric Schulte <schulte.eric@gmail.com> wrote:

> 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,
> 
> From 4611b177def45bf23c2cfb1caf0b12baa5e0e91b Mon Sep 17 00:00:00 2001
> From: Eric Schulte <schulte.eric@gmail.com>
> 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 "<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)
> -- 
> 1.8.2.3
> 
> 
> -- 
> Eric Schulte
> http://cs.unm.edu/~eschulte

  reply	other threads:[~2013-05-21  6:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-21  0:16 patch for htmlize.el Eric Schulte
2013-05-21  6:49 ` Carsten Dominik [this message]
2013-05-21 10:25   ` Bastien
2013-05-21 12:42     ` Eric Schulte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4132A8D4-6784-4686-BF01-A72BEDFC66CC@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=schulte.eric@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).