diff options
Diffstat (limited to 'tex/context/base/l-aux.lua')
-rw-r--r-- | tex/context/base/l-aux.lua | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tex/context/base/l-aux.lua b/tex/context/base/l-aux.lua index 2c98a2f35..03a5c2bbf 100644 --- a/tex/context/base/l-aux.lua +++ b/tex/context/base/l-aux.lua @@ -8,7 +8,7 @@ if not aux then aux = { } end do - hash = { } + local hash = { } local function set(key,value) hash[key] = value @@ -29,9 +29,13 @@ do -- "a=1, b=2, c=3, d={a{b,c}d}, e=12345, f=xx{a{b,c}d}xx, g={}" : outer {} removes, leading spaces ignored function aux.settings_to_hash(str) - hash = { } - lpeg.match(pattern,str) - return hash + if str and str ~= "" then + hash = { } + lpeg.match(pattern,str) + return hash + else + return { } + end end local seperator = comma * space^0 |