Jump to content

Module:Road data/browsetable: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Produces a table to contain the output of Module:Road data/browse
(No difference)

Revision as of 19:02, 26 July 2024

local p = {}
local getArgs = require('Module:Arguments').getArgs

function p._browsetable(content)
	if not content then return nil end

	local tbl = mw.html.create('table'):addClass('browse-table')
	tbl:wikitext(content)

	return frame:extensionTag{
		name = 'templatestyles', args = { src = 'Module:Road data/browsetable/styles.css' }
	} .. tostring(tbl)
end

function p.browsetable(args)
	local args = getArgs(frame)

	return p._browsetable(args)
end

return p