(shr-insert): Only insert a blank line if we're starting from an image.
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Mon, 19 Mar 2012 13:21:43 +0000 (14:21 +0100)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Mon, 19 Mar 2012 13:21:43 +0000 (14:21 +0100)
lisp/ChangeLog
lisp/shr.el

index 2b52a65..d6b2626 100644 (file)
@@ -4,6 +4,7 @@
        space.  This seems to produce more pleasing results.
        (shr-tag-br): Make <br> 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  <pipping@lavabit.com>
 
index f46afaa..3ca7f1c 100644 (file)
@@ -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))