Jump to content

Module:Ustring

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Ans (talk | contribs) at 08:54, 1 March 2019 (use require("Module:LuaCall").import(mw.ustring)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

p = require("Module:LuaCall").import(mw.ustring)

for k, v in pairs(p) do
	p[k] = function(frame)
		local args = frame.args
		--for _, v in ipairs(args) do
		--	args[_] = tonumber(v) or v:gsub("^\\", "", 1)
		--end
		if args.tag then
			local tag = {name = args.tag, content = v(frame), args = {}}
			for x, y in pairs(args) do
				if type(x)~='number' and x~='tag' then tag.args[x] = y end
			end
			return frame:extensionTag(tag)
		end
		return (v(frame))
	end
end

return p