btw this Wiki is not meant for a wider audience yet
Module:PrefixList: Difference between revisions
Jump to navigation
Jump to search
m Remove category from Lua module (breaks code) Tag: Manual revert |
(No difference)
|
Latest revision as of 00:00, 6 December 2025
local p = {} function p.makeLinks(frame)
local input = frame.args[1]
local linkTarget = frame.args[2] -- Optional second parameter for link target
if not input or input == "" then
return "n/a"
end
local items = {}
for item in string.gmatch(input, "[^,]+") do
item = item:match("^%s*(.-)%s*$") -- trim whitespace
-- If linkTarget is provided, use item format
-- Otherwise, use item format
if linkTarget and linkTarget ~= "" then
table.insert(items, "" .. item .. "")
else
table.insert(items, "" .. item .. "")
end
end
return table.concat(items, "
")
end return p