diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-11-16 15:47:23 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-11-16 15:47:23 +0000 |
commit | ab21a6f65f545534d85268292bc3186e4eedb07e (patch) | |
tree | 8ab4bf1995ae4c3b3c1fe452adbcea882a0254bf /lualib | |
parent | 06062be5ce8e08bf87c28bb0eb0a486fbb26a167 (diff) | |
download | rspamd-ab21a6f65f545534d85268292bc3186e4eedb07e.tar.gz rspamd-ab21a6f65f545534d85268292bc3186e4eedb07e.zip |
[Minor] Allow argument atoms to start from `-`
Diffstat (limited to 'lualib')
-rw-r--r-- | lualib/lua_selectors/init.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lualib/lua_selectors/init.lua b/lualib/lua_selectors/init.lua index 22877f513..5fcdb3833 100644 --- a/lualib/lua_selectors/init.lua +++ b/lualib/lua_selectors/init.lua @@ -243,7 +243,7 @@ local function make_grammar() local utf8_high = l.R("\194\223") * cont + l.R("\224\239") * cont * cont + l.R("\240\244") * cont * cont * cont - local atom_start = (l.R("az") + l.R("AZ") + l.R("09") + utf8_high) ^ 1 + local atom_start = (l.R("az") + l.R("AZ") + l.R("09") + utf8_high + l.S "-") ^ 1 local atom_end = (l.R("az") + l.R("AZ") + l.R("09") + l.S "-_" + utf8_high) ^ 1 local atom_mid = (1 - l.S("'\r\n\f\\,)(}{= " .. '"')) ^ 1 local atom_argument = l.C(atom_start * atom_mid ^ 0 * atom_end ^ 0) -- We allow more characters for the arguments |