Revert "data/sample.lua: Fixed problem with definition lists."

This reverts commit 0e3736422e
in favor of @tarleb's fix.
This commit is contained in:
John MacFarlane 2017-12-27 10:48:28 -08:00
parent 1ce426a9cb
commit cb4123841c

View file

@ -245,9 +245,11 @@ end
-- Revisit association list STackValue instance.
function DefinitionList(items)
local buffer = {}
for _,item in ipairs(items) do
table.insert(buffer,"<dt>" .. item[1] .. "</dt>\n<dd>" ..
table.concat(item[2],"</dd>\n<dd>") .. "</dd>")
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
end
return "<dl>\n" .. table.concat(buffer, "\n") .. "\n</dl>"
end