diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-12-27 10:48:28 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-12-27 10:48:34 -0800 |
commit | cb4123841c5224c8862322d866ebb69153420b3e (patch) | |
tree | c2c2c8d7fab283dbb3abccf4564a2823fc1546e7 /data | |
parent | 1ce426a9cb9552a3388eb3d1b5e594ceb1d1f431 (diff) | |
download | pandoc-cb4123841c5224c8862322d866ebb69153420b3e.tar.gz |
Revert "data/sample.lua: Fixed problem with definition lists."
This reverts commit 0e3736422ee97a5cfedc255705f566a319f954f9
in favor of @tarleb's fix.
Diffstat (limited to 'data')
-rw-r--r-- | data/sample.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/data/sample.lua b/data/sample.lua index 3ea95ebd8..0c9422743 100644 --- a/data/sample.lua +++ b/data/sample.lua @@ -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 |