From ab21a6f65f545534d85268292bc3186e4eedb07e Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 16 Nov 2023 15:47:23 +0000 Subject: [PATCH] [Minor] Allow argument atoms to start from `-` --- lualib/lua_selectors/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.5