diff options
Diffstat (limited to 'contrib/mumble-autolink.tengo')
-rw-r--r-- | contrib/mumble-autolink.tengo | 6 |
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>`) +} |