aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-03-18 20:21:43 +0100
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-03-19 13:21:37 +0100
commit58bab7b01496f2d26dd3d766ff060152daef25e7 (patch)
tree9d8468c622c8733d1398984dec25430ffbb32bf7 /lisp
parent2747faee5cd06b7a660f8a907969e19d2eb633b1 (diff)
edit tag/handle regex to handle preceding opening bracket. FIX #406.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-toot.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index 8d63fce..87b4afb 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -223,16 +223,16 @@ send.")
(defvar mastodon-toot-handle-regex
(concat
- ;; preceding space or bol [boundary doesn't work with @]
- "\\([\n\t ]\\|^\\)"
+ ;; preceding bracket, space or bol [boundary doesn't work with @]
+ "\\([(\n\t ]\\|^\\)"
"\\(?2:@[1-9a-zA-Z._-]+" ; a handle
"\\(@[^ \n\t]*\\)?\\)" ; with poss domain, * = allow only @
"\\b"))
(defvar mastodon-toot-tag-regex
(concat
- ;; preceding space or bol [boundary doesn't work with #]
- "\\([\n\t ]\\|^\\)"
+ ;; preceding bracket, space or bol [boundary doesn't work with #]
+ "\\([(\n\t ]\\|^\\)"
"\\(?2:#[1-9a-zA-Z_]+\\)" ; tag
"\\b")) ; boundary