diff options
author | Gregor Dschung <gregor@chkpnt.de> | 2020-04-19 11:13:55 +0200 |
---|---|---|
committer | Gregor Dschung <gregor@chkpnt.de> | 2020-04-19 11:13:55 +0200 |
commit | 7a55c51038fa71b4229c4cfbf3cd14044aeb1bc1 (patch) | |
tree | e3e1eac64dd14e5ea8569c564e0fa461d5063d42 /lualib/lua_selectors/transforms.lua | |
parent | 7f2cdca0bba88179d8a5cb0b621eb263964525a2 (diff) | |
download | rspamd-7a55c51038fa71b4229c4cfbf3cd14044aeb1bc1.tar.gz rspamd-7a55c51038fa71b4229c4cfbf3cd14044aeb1bc1.zip |
[Minor] Pet luacheck
Diffstat (limited to 'lualib/lua_selectors/transforms.lua')
-rw-r--r-- | lualib/lua_selectors/transforms.lua | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lualib/lua_selectors/transforms.lua b/lualib/lua_selectors/transforms.lua index 4cfff3654..85a445f67 100644 --- a/lualib/lua_selectors/transforms.lua +++ b/lualib/lua_selectors/transforms.lua @@ -413,7 +413,7 @@ Empty string comes the first argument or 'true', non-empty string comes nil]], end end, ['description'] = 'Applies mask to IP address.' .. - ' The first argument is the mask for IPv4 addresses, the second is the mask for IPv6 addresses.', + ' The first argument is the mask for IPv4 addresses, the second is the mask for IPv6 addresses.', ['args_schema'] = {(ts.number + ts.string / tonumber), (ts.number + ts.string / tonumber):is_optional()} }, @@ -426,13 +426,16 @@ Empty string comes the first argument or 'true', non-empty string comes nil]], ['map_type'] = 'string', ['process'] = function(inp, _, args) if type(inp) == 'table' then - return fun.map( function(s) return string.gsub(tostring(s), '[\128-\255]', args[1] or '?') end , inp), 'string_list' + return fun.map( + function(s) + return string.gsub(tostring(s), '[\128-\255]', args[1] or '?') + end, inp), 'string_list' else return string.gsub(tostring(inp), '[\128-\255]', '?'), 'string' end - end, - ['description'] = 'Returns the string with all non-ascii bytes replaced with the character given as second argument or `?`', + ['description'] = 'Returns the string with all non-ascii bytes replaced with the character ' .. + 'given as second argument or `?`', ['args_schema'] = {ts.string:is_optional()} }, |