git.iko.soy/typeable/pandoc
on master help sign in
Revert "data/sample.lua: Fixed problem with definition lists."

This reverts commit 0e3736422ee97a5cfedc255705f566a319f954f9 in favor of @tarleb's fix.

commitcb4123841c5224c8862322d866ebb69153420b3e authorJohn MacFarlane <jgm@berkeley.edu> dateWed 27 Dec 2017, 10:48 (9 years ago) parent1ce426a
1 file changed+5−3
data/sample.lua+5−3
data/sample.lua+5−3
@@ -245,9 +245,11 @@ end
245245-- Revisit association list STackValue instance.
246246function DefinitionList(items)
247247 local buffer = {}
248− for _,item in ipairs(items) do
249− table.insert(buffer,"<dt>" .. item[1] .. "</dt>\n<dd>" ..
250− table.concat(item[2],"</dd>\n<dd>") .. "</dd>")
248+ for _,item in pairs(items) do
249+ for k, v in pairs(item) do
250+ table.insert(buffer,"<dt>" .. k .. "</dt>\n<dd>" ..
251+ table.concat(v,"</dd>\n<dd>") .. "</dd>")
252+ end
251253 end
252254 return "<dl>\n" .. table.concat(buffer, "\n") .. "\n</dl>"
253255end