(shr-find-fill-point): Don't leave blanks at the start of some lines.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Tue, 19 Oct 2010 23:15:13 +0000 (01:15 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Tue, 19 Oct 2010 23:15:13 +0000 (01:15 +0200)
lisp/ChangeLog
lisp/shr.el

index 2d43410..018eabe 100644 (file)
@@ -1,5 +1,8 @@
 2010-10-19  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * shr.el (shr-find-fill-point): Don't leave blanks at the start of some
+       lines.
+
        * nndoc.el (nndoc-type-alist): Add git support.
        (nndoc-git-type-p): New function.
        (nndoc-transform-git-article): Ditto.
index e360eab..cdb6ea6 100644 (file)
@@ -241,8 +241,8 @@ redirects somewhere else."
                  (insert "\n"))
          (put-text-property (1- (point)) (point) 'shr-break t)
          ;; No space is needed at the beginning of a line.
-         (if (eq (following-char) ? )
-             (delete-char 1)))
+         (when (eq (following-char) ? )
+           (delete-char 1)))
        (when (> shr-indentation 0)
          (shr-indent))
        (end-of-line))
@@ -280,6 +280,8 @@ redirects somewhere else."
              (while (and (> count 0)
                          (aref (char-category-set (following-char)) ?>))
                (forward-char 1)))
+           (when (eq (following-char) ? )
+             (forward-char 1))
            t)))))
 
 (defun shr-ensure-newline ()