diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2022-11-17 14:57:23 +0100 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2022-11-17 14:57:54 +0100 |
commit | 98276c45f29d4e45955ad7649758619453423cb4 (patch) | |
tree | fa5695bf15baef75cf53d7e5bcd894682bc4a341 | |
parent | 7b6aaa5a5e9986f5114f11a3d6ded93403cf7205 (diff) |
tweak toot prop mentions regex
-rw-r--r-- | lisp/mastodon-toot.el | 10 |
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." |