8,756
edits
(revert previous two changes) |
(added linkprefix/linkpostfix for stuff you want inside the brackets for specific namespaces,categories, etc) |
||
Line 6: | Line 6: | ||
local prefix = frame.args[4] | local prefix = frame.args[4] | ||
local postfix = frame.args[5] | local postfix = frame.args[5] | ||
local b = string.gsub(frame.args[1], "%s*" .. separator .. "%s*", "]]" .. replacer .. "[[") | local linkprefix = frame.args[6] | ||
return prefix .. "[[" .. b .. "]]" .. postfix | local linkpostfix = frame.args[7] | ||
local b = string.gsub(frame.args[1], "%s*" .. separator .. "%s*", linkpostfix .. "]]" .. replacer .. "[[" .. linkprefix) | |||
return prefix .. "[[" .. linkprefix and linkprefix or '' .. b .. linkpostfix and linkpostfix or ''.."]]" .. postfix | |||
end | end | ||
return p | return p |