(shr-insert): Use string anchors instead of line anchors.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Mon, 4 Oct 2010 07:31:50 +0000 (09:31 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Mon, 4 Oct 2010 07:31:50 +0000 (09:31 +0200)
lisp/ChangeLog
lisp/shr.el

index 3f04142..f95ae17 100644 (file)
@@ -1,3 +1,7 @@
+2010-10-04  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * shr.el (shr-insert): Use string anchors instead of line anchors.
+
 2010-10-03  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * shr.el: Add headings.
index faeb16a..118afe2 100644 (file)
@@ -237,7 +237,7 @@ fit these criteria."
    (t
     (let ((first t)
          column)
-      (when (and (string-match "^[ \t\n]" text)
+      (when (and (string-match "\\`[ \t\n]" text)
                 (not (bolp)))
        (insert " "))
       (dolist (elem (split-string text))
@@ -258,7 +258,7 @@ fit these criteria."
        (unless shr-start
          (setq shr-start (point)))
        (insert elem))
-      (when (and (string-match "[ \t\n]$" text)
+      (when (and (string-match "[ \t\n]\\'" text)
                 (not (bolp)))
        (insert " "))))))