Module:Demo

This is the current revision of this page, as edited by Alex (talk | contribs) at 22:48, 11 October 2024 (Created page with "--<nowiki> local T = require("Module:T")._main local p = {} function p.f(frame) local args = frame:getParent().args local template = args[1] local _args = {} for k, v in pairs(args) do if type(k) == "number" then if k ~= 1 then _args[k - 1] = v end else _args[k] = v end end return '<span class="plainlinks">' .. T(args) .. " produces<br>" .. frame:expandTemplate({ title = template, args = _args }) .. '</span>' end return p --</nowiki>"). The present address (URL) is a permanent link to this version.

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Module documentation
This documentation is transcluded from Template:No documentation/doc. [edit] [history] [purge]
This module does not have any documentation. Please consider adding documentation at Module:Demo/doc. [edit]
Module:Demo requires Module:T.

--<nowiki>
local T = require("Module:T")._main

local p = {}

function p.f(frame)
	local args = frame:getParent().args
	local template = args[1]
	local _args = {}
	for k, v in pairs(args) do
		if type(k) == "number" then
			if k ~= 1 then
				_args[k - 1] = v
			end
		else
			_args[k] = v
		end
	end
	return '<span class="plainlinks">' .. T(args) .. " produces<br>" .. frame:expandTemplate({ title = template, args = _args }) .. '</span>'
end

return p
--</nowiki>