1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-24 14:30:43 -08:00

* lisp/net/shr.el (shr-expand-url): Also strip trailing

whitespace.
This commit is contained in:
Andreas Schwab 2021-12-23 19:06:13 +01:00
parent 29fffbdd87
commit edb1d491d9

View file

@ -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)