From: Lars Magne Ingebrigtsen Date: Mon, 4 Oct 2010 07:42:58 +0000 (+0000) Subject: shr.el (shr-insert): Use string anchors instead of line anchors. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~46^2~192 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=23179cb9f1f9ebc442e5feef277d264cdf561c70;p=emacs.git shr.el (shr-insert): Use string anchors instead of line anchors. --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 17befd37e61..07e2963107f 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,7 @@ +2010-10-04 Lars Magne Ingebrigtsen + + * shr.el (shr-insert): Use string anchors instead of line anchors. + 2010-10-03 Lars Magne Ingebrigtsen * shr.el: Add headings. diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el index faeb16a7c01..118afe2f3e5 100644 --- a/lisp/gnus/shr.el +++ b/lisp/gnus/shr.el @@ -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 " "))))))