"मोड्युल:Mapframe" के अवतरणसभमे अन्तर
Content deleted Content added
start |
+ |
||
पङ्क्त्ति २०:
local tag --todo
return tag
end▼
function makeContent(args)
local contentIndex = '';
while Args['type'..contentIndex] do▼
local contentArgs = {}▼
contentArgs['type'] = Args['type'..contentIndex]▼
--todo: Add other relevant args▼
content[contentIndex or 1] = makeContentJson(contentArgs)▼
contentIndex = (contentIndex or 1) + 1▼
end
--Single item, no array needed
if #content==1 then
return content[0]
end
--Multiple items get placed in an array
local contentArray = '[\n' + table.concat( content, ',\n') + '\n]'
return contentArray
end
Line ३४ ⟶ ५७:
return mw.text.jsonEncode(data)
end
local p = {}
Line ४१ ⟶ ६५:
Args = setCleanArgs(parent.args)
local
▲ local contentIndex = '';
▲ while Args['type'..contentIndex] do
▲ local contentArgs = {}
▲ contentArgs['type'] = Args['type'..contentIndex]
▲ --todo: Add other relevant args
-- todo: make tag(s)
▲ content[contentIndex or 1] = makeContentJson(contentArgs)
▲ contentIndex = (contentIndex or 1) + 1
-- todo
local output = ''
return output
end
return p
▲end
|