From ba4489691847ed1cff2f33f1bfa9aeda85af2a6b Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Tue, 3 Feb 2015 13:17:59 -0200 Subject: New function sx--squash-whitespace --- sx.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sx.el b/sx.el index 26151b3..14af94d 100644 --- a/sx.el +++ b/sx.el @@ -331,6 +331,10 @@ GET-FUNC and performs the actual comparison." (funcall ,get-func a) (funcall ,get-func b)))) +(defun sx--squash-whitespace (string) + "Return STRING with consecutive whitespace squashed together." + (replace-regexp-in-string "[ \r\n]+" " " string)) + ;;; Printing request data (defvar sx--overlays nil -- cgit v1.2.3