aboutsummaryrefslogtreecommitdiff
path: root/sx.el
diff options
context:
space:
mode:
authorSean Allred <code@seanallred.com>2015-02-03 20:31:36 -0600
committerSean Allred <code@seanallred.com>2015-02-03 20:31:36 -0600
commit157a59aa853d24b2e21e8fde1a4862252edb1c00 (patch)
tree6e66d13f208d7e3f963356461c675c28124527dc /sx.el
parent2c9e84e67a54c163fd194194dc2a4f0266336cc9 (diff)
parentf275e00c221c506cd4f22144649649e65179e3cc (diff)
Merge pull request #247 from vermiculus/issue-246--compress-commments
Issue 246 compress commments
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