emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs-28 edb1d49: * lisp/net/shr.el (shr-expand-url): Also strip tra


From: Stefan Kangas
Subject: Re: emacs-28 edb1d49: * lisp/net/shr.el (shr-expand-url): Also strip trailing
Date: Thu, 23 Dec 2021 10:40:48 -0800

schwab@gnu.org (Andreas Schwab) writes:

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

This could be simplified to:

    (setq url (string-trim url))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]