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:
parent
60639b6e50
commit
3e20a3d180
6
contrib/mumble-autolink.tengo
Normal file
6
contrib/mumble-autolink.tengo
Normal 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>`)
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user