summaryrefslogtreecommitdiff
path: root/doc/pl
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2014-03-02 18:59:57 +0100
committerSebastien Helleu <flashcode@flashtux.org>2014-03-02 18:59:57 +0100
commitbd06f0f60f8c3f5ab883df9cb876fe29715055b3 (patch)
tree7b7029b83cf96ef6f4dce7697e841dbb7f0a9be8 /doc/pl
parentbe9046741f87e2eb6fd229945d05f05b6713bd25 (diff)
downloadweechat-bd06f0f60f8c3f5ab883df9cb876fe29715055b3.zip
doc: add trigger example to colorize URLs
Diffstat (limited to 'doc/pl')
-rw-r--r--doc/pl/weechat_user.pl.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/pl/weechat_user.pl.txt b/doc/pl/weechat_user.pl.txt
index 2cec905f9..cf642eeb9 100644
--- a/doc/pl/weechat_user.pl.txt
+++ b/doc/pl/weechat_user.pl.txt
@@ -3336,6 +3336,19 @@ string/string).
[[trigger_examples]]
==== Examples
+[[trigger_example_url_color]]
+===== Color for URLs
+
+Display URLs in green:
+
+----
+/trigger add url_color modifier weechat_print "${tg_notify}" "==\S+://\S+==${color:green}$0${color:reset}=="
+----
+
+[NOTE]
+The simple regex used to detect URL may not catch well all URLs, but it is
+faster than a complex regex.
+
[[trigger_example_auto_pong]]
===== Auto pong on ping queries