From 154418341089c335d0679d37a22c42e6cfab6077 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Tue, 16 May 2023 13:59:42 +0200 Subject: use toot-url-regex rather than hack regex in count-toot-chars --- lisp/mastodon-toot.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lisp') 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)) -- cgit v1.2.3