Have shr pretend that non-breaking space is normal space
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Mon, 19 Mar 2012 12:46:15 +0000 (13:46 +0100)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Mon, 19 Mar 2012 12:46:15 +0000 (13:46 +0100)
* shr.el (shr-insert): Treat non-breaking space just like normal
space.  This seems to produce more pleasing results.

lisp/ChangeLog
lisp/shr.el

index f23cf88..3aeb5b5 100644 (file)
@@ -1,3 +1,8 @@
+2012-03-19  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * shr.el (shr-insert): Treat non-breaking space just like normal
+       space.  This seems to produce more pleasing results.
+
 2012-03-15  Elias Pipping  <pipping@lavabit.com>
 
        * Makefile.in: Respect DESTDIR.
index 2d477fd..11d0f3e 100644 (file)
@@ -344,7 +344,7 @@ size, and full-buffer size."
               (not (bolp))
               (not (eq (char-after (1- (point))) ? )))
       (insert " "))
-    (dolist (elem (split-string text))
+    (dolist (elem (split-string text "[ \f\t\n\r\v ]+" t))
       (when (and (bolp)
                 (> shr-indentation 0))
        (shr-indent))