function wide(el)
local els = pandoc.List()
els:insert(pandoc.RawBlock("html", ""))
if pcall(function() return #el end) then
els:extend(el)
else
els:insert(el)
end
els:insert(pandoc.RawBlock("html", "
"))
return els
end
function dump(o)
if type(o) == 'table' then
local s = '{ '
for k, v in pairs(o) do
if type(k) ~= 'number' then k = '"' .. k .. '"' end
s = s .. '[' .. k .. '] = ' .. dump(v) .. ','
end
return s .. '} '
else
return tostring(o)
end
end
function string.split(str, sep)
sep = sep or '%s'
local parts = pandoc.List()
for field, s in str:gmatch("([^" .. sep .. "]*)(" .. sep .. "?)") do
parts:insert(field)
if s == "" then return parts end
end
end
return {
wide = wide, dump = dump
}