(shr-insert): Tweak line breaking.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Mon, 4 Oct 2010 10:09:46 +0000 (12:09 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Mon, 4 Oct 2010 10:09:46 +0000 (12:09 +0200)
lisp/ChangeLog
lisp/shr.el

index f365ced..e00eaf9 100644 (file)
@@ -1,6 +1,7 @@
 2010-10-04  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * shr.el (shr-ensure-paragraph): Fix the non-empty line case.
 2010-10-04  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * shr.el (shr-ensure-paragraph): Fix the non-empty line case.
+       (shr-insert): Tweak line breaking.
 
 2010-10-04  Julien Danjou  <julien@danjou.info>
 
 
 2010-10-04  Julien Danjou  <julien@danjou.info>
 
index bfcb91e..05fd4b3 100644 (file)
@@ -242,11 +242,12 @@ fit these criteria."
        (insert " "))
       (dolist (elem (split-string text))
        (setq column (current-column))
        (insert " "))
       (dolist (elem (split-string text))
        (setq column (current-column))
-       (when (> column 0)
+       (when (and (not first)
+                  (> column 0))
          (cond
           ((> (+ column (length elem) 1) shr-width)
            (insert "\n"))
          (cond
           ((> (+ column (length elem) 1) shr-width)
            (insert "\n"))
-          ((not first)
+          (t
            (insert " "))))
        (setq first nil)
        (when (and (bolp)
            (insert " "))))
        (setq first nil)
        (when (and (bolp)