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:
parent
c69c65676d
commit
d2b8611862
@ -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)))
|
||||
|
||||
|
@ -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"))
|
||||
|
Loading…
Reference in New Issue
Block a user