Module:DPL

require('Module:LoadLib')(_G)

local p = {}

local frame = mw.getCurrentFrame

function p.parse(t) return frame:preprocess(string.parserTag('dpl', t)) end

function p.recurse(t) t['noresultsheader'] = t['noresultsheader'] or '' local offset = t['offset'] or 0 local buffer = {} local parsed = p.parse(t) if parsed == t['noresutltsheader'] then if t['noresultsheader'] == '' then return '' else return t['noresultsheader'] end end while parsed ~= t['noresultsheader'] do       table.insert(buffer, parsed) offset = offset + p.COUNT t['offset'] = offset parsed = p.parse(t) end return table.concat(buffer) end

function p.list(t) checkType(1, t, 'table') t['format'] = ',,%PAGE%#,' local content = p.recurse(t) local results = {} for page in content:gmatch("[^#]+") do       table.insert(results, page) end return results end

return p