summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-12-27 09:16:01 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2017-12-27 09:16:01 -0800
commit0e3736422ee97a5cfedc255705f566a319f954f9 (patch)
tree936e68ede22565b82b0aa688bf244656ac768707 /data
parente23e1f3c22c865ba003c3bd32c5c05bef516c9e8 (diff)
data/sample.lua: Fixed problem with definition lists.
Diffstat (limited to 'data')
-rw-r--r--data/sample.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/data/sample.lua b/data/sample.lua
index 1e3a08731..d3c5ad3df 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