aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-05-16 13:59:42 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-05-16 13:59:42 +0200
commit154418341089c335d0679d37a22c42e6cfab6077 (patch)
treeca33931f097c75861ccb01e55f77cb2f3219f169
parentda2e9048315dfa83a830eb11e656eb33bf95a85a (diff)
use toot-url-regex rather than hack regex in count-toot-chars
-rw-r--r--lisp/mastodon-toot.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index 9c2179a..59b8364 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -1570,7 +1570,8 @@ CW is the content warning, which contributes to the character count."
(insert toot-string)
(goto-char (point-min))
;; handle URLs
- (while (search-forward-regexp "\\w+://[^ \n]*" nil t) ; URL
+ (while (search-forward-regexp mastodon-toot-url-regex nil t)
+ ; "\\w+://[^ \n]*" old regex
(replace-match "xxxxxxxxxxxxxxxxxxxxxxx")) ; 23 x's
;; handle @handles
(goto-char (point-min))