From 3e20a3d180afc4a33aa899b76ed01a782f2150a0 Mon Sep 17 00:00:00 2001 From: mvoolt <77506726+mvoolt@users.noreply.github.com> Date: Tue, 4 Apr 2023 00:00:54 +0300 Subject: Create mumble-autolink.tengo (#2029) --- contrib/mumble-autolink.tengo | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 contrib/mumble-autolink.tengo (limited to 'contrib') diff --git a/contrib/mumble-autolink.tengo b/contrib/mumble-autolink.tengo new file mode 100644 index 00000000..527ff6f1 --- /dev/null +++ b/contrib/mumble-autolink.tengo @@ -0,0 +1,6 @@ +text := import("text") + +if outProtocol == "mumble" { + urlRE := text.re_compile(`(?is)((http|https):\/\/)?([a-z0-9-]+\.)?[a-z0-9-]+(\.[a-z]{2,6}){1,3}(\/[a-z0-9.,_\/~#&=;%+?-]*)?`) + msgText = urlRE.replace(msgText,`$0`) +} -- cgit v1.2.3