[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master d2b8611: Further string-clean-whitespace tweaks
From: |
Lars Ingebrigtsen |
Subject: |
master d2b8611: Further string-clean-whitespace tweaks |
Date: |
Mon, 21 Dec 2020 22:24:34 -0500 (EST) |
branch: master
commit d2b86118629562600c07dbc5befa78ac8b860b68
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Further string-clean-whitespace tweaks
* lisp/emacs-lisp/subr-x.el (string-clean-whitespace): Put \r
back, which was mistakenly removed.
---
lisp/emacs-lisp/subr-x.el | 2 +-
test/lisp/emacs-lisp/subr-x-tests.el | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el
index aa39fc1..6f4f7ed 100644
--- a/lisp/emacs-lisp/subr-x.el
+++ b/lisp/emacs-lisp/subr-x.el
@@ -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)))
diff --git a/test/lisp/emacs-lisp/subr-x-tests.el
b/test/lisp/emacs-lisp/subr-x-tests.el
index ab5a5bf..2e16cd0 100644
--- a/test/lisp/emacs-lisp/subr-x-tests.el
+++ b/test/lisp/emacs-lisp/subr-x-tests.el
@@ -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"))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master d2b8611: Further string-clean-whitespace tweaks,
Lars Ingebrigtsen <=