From 8de7a3def486ceae9e4a52fd7f0b2ca726a8aec0 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Wed, 6 Oct 2010 15:09:35 +0200 Subject: [PATCH] (shr-render-td): Only delete space at the end of the TD. --- lisp/ChangeLog | 1 + lisp/shr.el | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 70402a296..d00534525 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,7 @@ 2010-10-06 Lars Magne Ingebrigtsen * shr.el (shr-insert): Get 'space transition right. + (shr-render-td): Only delete space at the end of the TD. * nnimap.el (nnimap-open-connection): Prepare to support open-gnutls-stream. diff --git a/lisp/shr.el b/lisp/shr.el index e0bb868f4..1c496ced5 100644 --- a/lisp/shr.el +++ b/lisp/shr.el @@ -553,8 +553,10 @@ Return a string with image data." (let ((shr-width width) (shr-indentation 0)) (shr-generic cont)) - (while (re-search-backward "\n *$" nil t) - (delete-region (match-beginning 0) (match-end 0))) + (delete-region + (point) + (+ (point) + (skip-chars-backward " \t\n"))) (goto-char (point-min)) (let ((max 0)) (while (not (eobp)) -- 2.25.1