aboutsummaryrefslogtreecommitdiff
path: root/sx.el
diff options
context:
space:
mode:
Diffstat (limited to 'sx.el')
-rw-r--r--sx.el4
1 files changed, 4 insertions, 0 deletions
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