From 26eca13465f697cd34c9ce6a4a9321eecc17b15c Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Mon, 19 Mar 2012 14:21:43 +0100 Subject: [PATCH] (shr-insert): Only insert a blank line if we're starting from an image. --- lisp/ChangeLog | 1 + lisp/shr.el | 1 + 2 files changed, 2 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2b52a6529..d6b262616 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -4,6 +4,7 @@ space. This seems to produce more pleasing results. (shr-tag-br): Make
only ensure a line break instead of always creating a blank line. This looks more readable in my test corpus. + (shr-insert): Only insert a blank line if we're starting from an image. 2012-03-15 Elias Pipping diff --git a/lisp/shr.el b/lisp/shr.el index f46afaa72..3ca7f1c14 100644 --- a/lisp/shr.el +++ b/lisp/shr.el @@ -333,6 +333,7 @@ size, and full-buffer size." (defun shr-insert (text) (when (and (eq shr-state 'image) + (not (bolp)) (not (string-match "\\`[ \t\n]+\\'" text))) (insert "\n") (setq shr-state nil)) -- 2.25.1