From 687bcf9f8c1c78f23f3f01c24bd40b380034db9f Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Mon, 4 Oct 2010 09:31:50 +0200 Subject: [PATCH] (shr-insert): Use string anchors instead of line anchors. --- lisp/ChangeLog | 4 ++++ lisp/shr.el | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3f04142f7..f95ae1753 100644 --- a/lisp/ChangeLog +++ b/lisp/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/shr.el b/lisp/shr.el index faeb16a7c..118afe2f3 100644 --- a/lisp/shr.el +++ b/lisp/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.25.1