Replace some util.splits with gmatch and match
This commit is contained in:
parent
9f7832b827
commit
8766b050bd
1 changed files with 2 additions and 3 deletions
|
@ -666,10 +666,9 @@ function UVL._read_dependency( self, values, deps )
|
||||||
if values then
|
if values then
|
||||||
values = ( type(values) == "table" and values or { values } )
|
values = ( type(values) == "table" and values or { values } )
|
||||||
for _, value in ipairs(values) do
|
for _, value in ipairs(values) do
|
||||||
local parts = util.split( value, "%s*,%s*", nil, true )
|
|
||||||
local condition = { }
|
local condition = { }
|
||||||
for i, val in ipairs(parts) do
|
for val in value:gmatch("[^%s,]+") do
|
||||||
local k, v = unpack(util.split(val, "%s*=%s*", nil, true))
|
local k, v = val:match("([^%s]+)%s*=%s*([^%s]+)")
|
||||||
|
|
||||||
if k and (
|
if k and (
|
||||||
k:match("^"..expr.."%."..expr.."%."..expr.."$") or
|
k:match("^"..expr.."%."..expr.."%."..expr.."$") or
|
||||||
|
|
Loading…
Reference in a new issue