Date: Wed, 3 Feb 2021 06:56:10 GMT From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: e3cd8246c756 - stable/13 - lualoader: position hyphens at the beginning of character classes Message-ID: <202102030656.1136uA5R000929@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=e3cd8246c756e568956da1ad8e90e1983d9af89f commit e3cd8246c756e568956da1ad8e90e1983d9af89f Author: Kyle Evans <kevans@FreeBSD.org> AuthorDate: 2021-01-31 15:51:39 +0000 Commit: Kyle Evans <kevans@FreeBSD.org> CommitDate: 2021-02-03 06:55:51 +0000 lualoader: position hyphens at the beginning of character classes According to the Lua 5.4 manual section 6.4.1 ("Patterns"), the interaction between ranges and classes is not defined and hyphens must be specified at either the beginning or the end of a set if they are not escaped. Move all such occurrences to the beginning. (cherry picked from commit b24872cf7b13314669ed2136c0262bb2eb007695) --- stand/lua/config.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stand/lua/config.lua b/stand/lua/config.lua index f569b2e00b76..9ef7c0796f46 100644 --- a/stand/lua/config.lua +++ b/stand/lua/config.lua @@ -62,10 +62,10 @@ local MSG_FAILSYN_EOLESC = "Stray escape at end of line" local MSG_FAILSYN_EOLVAR = "Unescaped $ at end of line" local MSG_FAILSYN_BADVAR = "Malformed variable expression at position '%d'" -local MODULEEXPR = '([%w-_]+)' +local MODULEEXPR = '([-%w_]+)' local QVALEXPR = '"(.*)"' local QVALREPL = QVALEXPR:gsub('%%', '%%%%') -local WORDEXPR = "([%w%d-][%w%d-_.]*)" +local WORDEXPR = "([-%w%d][-%w%d_.]*)" local WORDREPL = WORDEXPR:gsub('%%', '%%%%') -- Entries that should never make it into the environment; each one should have @@ -182,7 +182,7 @@ local function processEnvVar(value) -- Skip the $ vinit = i + 1 vdelim = nil - vpat = "^([%w][%w%d-_.]*)" + vpat = "^([%w][-%w%d_.]*)" end local name = value:match(vpat, vinit) @@ -346,7 +346,7 @@ local function getBlacklist() return blacklist end - for mod in blacklist_str:gmatch("[;, ]?([%w-_]+)[;, ]?") do + for mod in blacklist_str:gmatch("[;, ]?([-%w_]+)[;, ]?") do blacklist[mod] = true end return blacklist
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202102030656.1136uA5R000929>