aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
Diffstat (limited to 'data')
-rw-r--r--data/sample.lua10
1 files changed, 4 insertions, 6 deletions
diff --git a/data/sample.lua b/data/sample.lua
index 1e3a08731..3ea95ebd8 100644
--- a/data/sample.lua
+++ b/data/sample.lua
@@ -245,11 +245,9 @@ end
-- Revisit association list STackValue instance.
function DefinitionList(items)
local buffer = {}
- for _,item in pairs(items) do
- for k, v in pairs(item) do
- table.insert(buffer,"<dt>" .. k .. "</dt>\n<dd>" ..
- table.concat(v,"</dd>\n<dd>") .. "</dd>")
- end
+ for _,item in ipairs(items) do
+ table.insert(buffer,"<dt>" .. item[1] .. "</dt>\n<dd>" ..
+ table.concat(item[2],"</dd>\n<dd>") .. "</dd>")
end
return "<dl>\n" .. table.concat(buffer, "\n") .. "\n</dl>"
end
@@ -288,7 +286,7 @@ function Table(caption, aligns, widths, headers, rows)
end
if widths and widths[1] ~= 0 then
for _, w in pairs(widths) do
- add('<col width="' .. string.format("%d%%", w * 100) .. '" />')
+ add('<col width="' .. string.format("%.0f%%", w * 100) .. '" />')
end
end
local header_row = {}