summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authormvoolt <77506726+mvoolt@users.noreply.github.com>2023-04-04 00:00:54 +0300
committerGitHub <noreply@github.com>2023-04-03 23:00:54 +0200
commit3e20a3d180afc4a33aa899b76ed01a782f2150a0 (patch)
tree43bd01ebdb892c32e9c1a5ad42c86707c69be34d /contrib
parent60639b6e5005f216d56b04a499540e0a4689e8d0 (diff)
downloadmatterbridge-msglm-3e20a3d180afc4a33aa899b76ed01a782f2150a0.tar.gz
matterbridge-msglm-3e20a3d180afc4a33aa899b76ed01a782f2150a0.tar.bz2
matterbridge-msglm-3e20a3d180afc4a33aa899b76ed01a782f2150a0.zip
Create mumble-autolink.tengo (#2029)
Diffstat (limited to 'contrib')
-rw-r--r--contrib/mumble-autolink.tengo6
1 files changed, 6 insertions, 0 deletions
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,`<a href="$0">$0</a>`)
+}