Jump to content

Module:Item

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Petr Matas (talk | contribs) at 02:40, 13 December 2015. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

local p = {}

function escape(str)
	return str:gsub("([|\\])", "\\%1")
end

function p.main(frame)
	local parent = frame:getParent()
	
	local result = ''
	for key, value in pairs(parent.args) do
		result = result .. "|" .. escape(tostring(key)) .. "|" .. escape(value)
	end
	
	return result;
end

return p