1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-08 15:35:02 +00:00

Further string-clean-whitespace tweaks

* lisp/emacs-lisp/subr-x.el (string-clean-whitespace): Put \r
back, which was mistakenly removed.
This commit is contained in:
Lars Ingebrigtsen 2020-12-22 04:24:25 +01:00
parent c69c65676d
commit d2b8611862
2 changed files with 2 additions and 2 deletions

View File

@ -269,7 +269,7 @@ carriage return."
All sequences of whitespaces in STRING are collapsed into a
single space character, and leading/trailing whitespace is
removed."
(let ((blank "[[:blank:]\n]+"))
(let ((blank "[[:blank:]\r\n]+"))
(string-trim (replace-regexp-in-string blank " " string t t)
blank blank)))

View File

@ -584,7 +584,7 @@
(ert-deftest subr-clean-whitespace ()
(should (equal (string-clean-whitespace " foo ") "foo"))
(should (equal (string-clean-whitespace " foo \n\t Bar") "foo Bar")))
(should (equal (string-clean-whitespace " foo \r\n\t Bar") "foo Bar")))
(ert-deftest subr-string-fill ()
(should (equal (string-fill "foo" 10) "foo"))