diff options
Diffstat (limited to 'doc/it')
-rw-r--r-- | doc/it/autogen/user/weechat_options.txt | 5 | ||||
-rw-r--r-- | doc/it/weechat_plugin_api.it.txt | 44 |
2 files changed, 49 insertions, 0 deletions
diff --git a/doc/it/autogen/user/weechat_options.txt b/doc/it/autogen/user/weechat_options.txt index 23c15a29d..fe24bde36 100644 --- a/doc/it/autogen/user/weechat_options.txt +++ b/doc/it/autogen/user/weechat_options.txt @@ -388,6 +388,11 @@ ** tipo: stringa ** valori: qualsiasi stringa (valore predefinito: `""`) +* *weechat.look.highlight_regex* +** descrizione: `regular expression used to check if a message has highlight or not, at least one match in string must be surrounded by word chars (alphanumeric, "-", "_" or "|"), regular expression is case sensitive, example: "FlashCode|flashy"` +** tipo: stringa +** valori: qualsiasi stringa (valore predefinito: `""`) + * *weechat.look.hline_char* ** descrizione: `carattere utilizzato per disegnare le righe orizzontali; notare che un valore vuoto disegnerà una vera riga con ncurses, ma può causare errori con la selezione dell'URL in alcuni terminali` ** tipo: stringa diff --git a/doc/it/weechat_plugin_api.it.txt b/doc/it/weechat_plugin_api.it.txt index fdee54429..ef00a156f 100644 --- a/doc/it/weechat_plugin_api.it.txt +++ b/doc/it/weechat_plugin_api.it.txt @@ -954,6 +954,50 @@ highlight = weechat.string_has_highlight(string, highlight_words) highlight = weechat.string_has_highlight("my test string", "test,word2") # 1 ---------------------------------------- +// TRANSLATION MISSING +weechat_string_has_highlight_regex +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +_New in version 0.3.4._ + +Check if a string has one or more highlights, using a regular expression. +For at least one match of regular expression on string, it must be surrounded +by word chars (alphanumeric character, "-", "_" or "|"). + +Prototype: + +[source,C] +---------------------------------------- +int weechat_string_has_highlight_regex (const char *string, const char *regex); +---------------------------------------- + +Arguments: + +* 'string': string +* 'regex': regular expression + +Return value: + +* 1 if string has one or more highlights, otherwise 0 + +C example: + +[source,C] +---------------------------------------- +int hl = weechat_string_has_highlight_regex ("my test string", "test|word2"); /* == 1 */ +---------------------------------------- + +Script (Python): + +[source,python] +---------------------------------------- +# prototype +highlight = weechat.string_has_highlight_regex(string, regex) + +# example +highlight = weechat.string_has_highlight_regex("my test string", "test|word2") # 1 +---------------------------------------- + weechat_string_mask_to_regex ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |