From 23179cb9f1f9ebc442e5feef277d264cdf561c70 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Mon, 4 Oct 2010 07:42:58 +0000 Subject: [PATCH] shr.el (shr-insert): Use string anchors instead of line anchors. --- lisp/gnus/ChangeLog | 4 ++++ lisp/gnus/shr.el | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) 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 " ")))))) -- 2.39.5