aboutsummaryrefslogtreecommitdiff
path: root/sx.el
diff options
context:
space:
mode:
authorSean Allred <code@seanallred.com>2014-11-27 11:21:02 -0500
committerSean Allred <code@seanallred.com>2014-11-27 11:21:02 -0500
commit92ec323425057284de93c90b7ae0e8f5e96611b6 (patch)
tree65112f05a72c0ba4ac74076d1c53f6612deeb1cd /sx.el
parent9c2df708ac4dc62c34882b7978761cf1f73e063f (diff)
parent6848008b60938100d04cda96c093a24cb3370f9a (diff)
Merge branch 'master' into issue-100
Diffstat (limited to 'sx.el')
-rw-r--r--sx.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/sx.el b/sx.el
index d4c3ac2..e47e6e3 100644
--- a/sx.el
+++ b/sx.el
@@ -199,10 +199,13 @@ Return the result of BODY."
result))
(defun sx--user-@name (user)
- "Get the `display_name' of USER prepended with @."
+ "Get the `display_name' of USER prepended with @.
+In order to correctly @mention the user, all whitespace is
+removed from the display name before it is returned."
(sx-assoc-let user
(when (stringp .display_name)
- (concat "@" .display_name))))
+ (concat "@" (replace-regexp-in-string
+ "[[:space:]]" "" .display_name)))))
;;; Assoc-let