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:23 +0100 |
commit | 99027d0d06b90d94a582ad3f67cf0e47af1b7afd (patch) | |
tree | 190e748e023c6bd4a40225ed0c8f2fe6003229be | |
parent | 4c596da597b1fd926736dfab25d4bd111997296a (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 a213856..6c2ccf6 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -1263,9 +1263,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." |