Module:FormatLinks: Difference between revisions
Jump to navigation
Jump to search
MIXERRULES (talk | contribs) m Testing Tag: Reverted |
MIXERRULES (talk | contribs) mNo edit summary |
||
(5 intermediate revisions by the same user not shown) | |||
Line 12: | Line 12: | ||
table.insert(Result, string.format("[[%s]]", Part)) | table.insert(Result, string.format("[[%s]]", Part)) | ||
else | else | ||
table.insert(Result, string.format("[[%s]] | table.insert(Result, string.format("[[%s]]", Part)) | ||
end | end | ||
end | end | ||
return | return table.concat(Result, "<br>") | ||
end | end | ||
return FormatLinksModuleDingus | return FormatLinksModuleDingus |
Latest revision as of 22:48, 15 December 2024
Documentation for this module may be created at Module:FormatLinks/doc
local FormatLinksModuleDingus = {}
function FormatLinksModuleDingus.Format(frame)
local Input = frame.args[1] or ""
local Parts = {}
for Word in string.gmatch(Input, '([^,]+)') do
table.insert(Parts, Word)
end
local Result = {}
for i, Part in ipairs(Parts) do
if i == 1 then
table.insert(Result, string.format("[[%s]]", Part))
else
table.insert(Result, string.format("[[%s]]", Part))
end
end
return table.concat(Result, "<br>")
end
return FormatLinksModuleDingus