data/sample.lua: fixed problem with tables.

Closes #4202.
This commit is contained in:
John MacFarlane 2017-12-27 09:16:15 -08:00
parent 0e3736422e
commit 27ba06fe8f

View file

@ -286,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 = {}