[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-28 edb1d49: * lisp/net/shr.el (shr-expand-url): Also strip trailin
From: |
Andreas Schwab |
Subject: |
emacs-28 edb1d49: * lisp/net/shr.el (shr-expand-url): Also strip trailing |
Date: |
Thu, 23 Dec 2021 13:09:57 -0500 (EST) |
branch: emacs-28
commit edb1d491d968144c4b3a0d0efe0afc22448c4684
Author: Andreas Schwab <schwab@linux-m68k.org>
Commit: Andreas Schwab <schwab@linux-m68k.org>
* lisp/net/shr.el (shr-expand-url): Also strip trailing
whitespace.
---
lisp/net/shr.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 48590fd..4a22091 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -941,9 +941,11 @@ size, and full-buffer size."
shr-base))
(when (zerop (length url))
(setq url nil))
- ;; Strip leading whitespace
+ ;; Strip leading/trailing whitespace
(and url (string-match "\\`\\s-+" url)
(setq url (substring url (match-end 0))))
+ (and url (string-match "\\s-+\\'" url)
+ (setq url (substring url 0 (match-beginning 0))))
(cond ((zerop (length url))
(nth 3 base))
((or (not base)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-28 edb1d49: * lisp/net/shr.el (shr-expand-url): Also strip trailing,
Andreas Schwab <=