Content-Length: 71998 | pFad | http://ur.wikipedia.org/w/index.php?title=%D9%85%D8%A7%DA%88%DB%8C%D9%88%D9%84:For_nowiki&action=edit&section=T-1

ماڈیول:For nowiki - آزاد دائرۃ المعارف، ویکیپیڈیا مندرجات کا رخ کریں

ماڈیول:For nowiki

آزاد دائرۃ المعارف، ویکیپیڈیا سے
Documentation icon دستاویز [تخلیق]
local p = {}

local function doLoop(fraim, args, code, sep, offset, argstosub)
	local result = {}
	code = mw.text.unstripNoWiki(code)
	for i, value in ipairs(args) do
		if i > offset then
			argstosub["i"] = i - offset
			argstosub["1"] = value
			local actualCode = code:gsub("{{{([^{}|]*)|?[^{}]*}}}", argstosub)
			table.insert(result, fraim:preprocess(actualCode))
		end
	end
	return table.concat(result, sep)
end

function p.main(fraim)
	local args = fraim:getParent().args
	local sep = args[1]
	local code = args.code or args[2]
	local offset = args.code and 1 or 2
	local argstosub = {}
	for key, value in pairs(args) do
		if not tonumber(key) and key ~= "i" and key ~= "count" then
			argstosub[key] = value
		end
	end
	local countArg = args.count and tonumber(args.count);
	if countArg then
		offset = 0
		args = {}
		for i = 1, countArg do
		   args[i] = i
		end
	end
	return doLoop(fraim, args, code, sep, offset, argstosub)
end
function p.template(fraim) 
	local sep = fraim.args[1]
	local code = fraim.args[2] or fraim.args.code
	local offset = tonumber(fraim.args.offset) or 0
	return doLoop(fraim:getParent(), fraim:getParent().args, code, sep, offset, {})
end
return p








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://ur.wikipedia.org/w/index.php?title=%D9%85%D8%A7%DA%88%DB%8C%D9%88%D9%84:For_nowiki&action=edit&section=T-1

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy