This commit is contained in:
steve donovan 2016-04-10 16:54:33 +02:00
parent 7dd360e7c0
commit 1ebd148291
1 changed files with 6 additions and 1 deletions

View File

@ -336,7 +336,12 @@ function M.get_parameters (tok,endtoken,delim,lang)
return text:match("%s*%-%-+%s*(.*)")
end
extract_arg = function(tl,idx)
return value_of(tl[idx or 1])
idx = idx or 1
local res = value_of(tl[idx])
if res == '[' then -- we do allow array indices in tables now
res = '['..value_of(tl[idx + 1])..']'
end
return res
end
end