<%-
for k,v in pairs(d.deps) do
-%>
- <%-=string.format('"cbid.%s.%s.%s"', self.config, section, k) .. ":" .. string.format("%q", v)-%>,
+ <%-=string.format('"cbid.%s.%s.%s"', self.config, section, k) .. ":" .. string.format("%q", v)-%>
+ <%-if next(d.deps, k) then-%>,<%-end-%>
<%-
end
-%>
<%-
for i, k in ipairs(self.keylist) do
-%>
- <%-=string.format("%q", k) .. ":" .. string.format("%q", self.vallist[i])-%>,
+ <%-=string.format("%q", k) .. ":" .. string.format("%q", self.vallist[i])-%>
+ <%-if i<#self.keylist then-%>,<%-end-%>
<%-
end
-%>
<%-
for k,v in pairs(d.deps) do
-%>
- <%-=string.format('"cbid.%s.%s.%s"', self.config, section, k) .. ":" .. string.format("%q", v)-%>,
+ <%-=string.format('"cbid.%s.%s.%s"', self.config, section, k) .. ":" .. string.format("%q", v)-%>
+ <%-if next(d.deps, k) then-%>,<%-end-%>
<%-
end
-%>
<%-
for i, val in pairs(self.optionals[section]) do
-%>
- <%-=string.format("%q", val.option) .. ":" .. string.format("%q", striptags(val.title))-%>,
+ <%-=string.format("%q", val.option) .. ":" .. string.format("%q", striptags(val.title))-%>
+ <%-if next(self.optionals[section], i) then-%>,<%-end-%>
<%-
end
-%>
<%-
for i, k in ipairs(self.keylist) do
-%>
- <%-=string.format("%q", k) .. ":" .. string.format("%q", self.vallist[i])-%>,
+ <%-=string.format("%q", k) .. ":" .. string.format("%q", self.vallist[i])-%>
+ <%-if i<#self.keylist then-%>,<%-end-%>
<%-
end
-%>