diff options
author | Steven Barth <steven@midlink.org> | 2008-09-11 12:58:57 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-09-11 12:58:57 +0000 |
commit | e5cb252043e0f5350ba26702e89a73713088d2a3 (patch) | |
tree | d4f163c4bd8542e1d29bc93a88a5398dab853585 | |
parent | c6492df6131ca08a02b80a89df35e3c3d7ea603e (diff) |
UVL: Fixed dependency handling
-rw-r--r-- | libs/uvl/luasrc/uvl.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/uvl/luasrc/uvl.lua b/libs/uvl/luasrc/uvl.lua index 9cdb9948dc..f7943d8d76 100644 --- a/libs/uvl/luasrc/uvl.lua +++ b/libs/uvl/luasrc/uvl.lua @@ -663,20 +663,20 @@ end -- Read a dependency specification function UVL._read_dependency( self, values, deps ) - local expr = "%$?[a-zA-Z0-9_]+" + local expr = "%$?[%w_]+" if values then values = ( type(values) == "table" and values or { values } ) for _, value in ipairs(values) do local condition = { } - for val in value:gmatch("[^%s,]+") do - local k, v = val:match("([^%s=]+)%s*=*%s*([^%s]*)") + for val in value:gmatch("[^,]+") do + local k, e, v = val:match("%s*([%w$_.]+)%s*(=?)%s*(.*)") if k and ( k:match("^"..expr.."%."..expr.."%."..expr.."$") or k:match("^"..expr.."%."..expr.."$") or k:match("^"..expr.."$") ) then - condition[k] = v or true + condition[k] = (e == '=') and v or true else return nil end |