aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-toot.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-17 14:57:23 +0100
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-17 14:57:54 +0100
commit98276c45f29d4e45955ad7649758619453423cb4 (patch)
treefa5695bf15baef75cf53d7e5bcd894682bc4a341 /lisp/mastodon-toot.el
parent7b6aaa5a5e9986f5114f11a3d6ded93403cf7205 (diff)
tweak toot prop mentions regex
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r--lisp/mastodon-toot.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index 3c4c7aa..125eeea 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -1265,9 +1265,13 @@ Added to `after-change-functions'."
(mastodon-toot--propertize-item "\\([\n\t ]\\|^\\)\\(?2:#[1-9a-zA-Z_]+\\)\\b"
'success
(cdr header-region))
- (mastodon-toot--propertize-item "\\([\n\t ]\\|^\\)\\(?2:@[1-9a-zA-Z._-]+\\)\\b"
- 'mastodon-display-name-face
- (cdr header-region)))))
+ (mastodon-toot--propertize-item
+ (concat "\\([\n\t ]\\|^\\)" ; preceding space or bol
+ "\\(?2:@[1-9a-zA-Z._-]+" ; a handle
+ "\\(@[1-9a-zA-Z._-]+\\)?\\)" ; with poss domain
+ "\\b") ; boundary
+ 'mastodon-display-name-face
+ (cdr header-region)))))
(defun mastodon-toot--propertize-item (regex face start)
"Propertize item matching REGEX with FACE starting from START."