5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-24 01:41:56 +00:00

Create mumble-autolink.tengo (#2029)

This commit is contained in:
mvoolt 2023-04-04 00:00:54 +03:00 committed by GitHub
parent 60639b6e50
commit 3e20a3d180
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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>`)
}