Module:UtilsPage: Difference between revisions
From Zelda Wiki, the Zelda encyclopedia
m
no edit summary
PhantomCaleb (talk | contribs) No edit summary |
PhantomCaleb (talk | contribs) mNo edit summary |
||
Line 27: | Line 27: | ||
if k == "format" or v.value == "format" then | if k == "format" or v.value == "format" then | ||
mw.addWarning("<code>format</code> argument cannot be used here. Format the resulting Lua table instead.") | mw.addWarning("<code>format</code> argument cannot be used here. Format the resulting Lua table instead.") | ||
elseif type(v) == "table" then | |||
dplArgs = dplArgs .. h.appendArg(v.param, v.value) | dplArgs = dplArgs .. h.appendArg(v.param, v.value) | ||
else | else | ||
Line 35: | Line 34: | ||
end | end | ||
dplArgs = dplArgs .. h.appendArg("format", ",,%PAGE%" .. SEPARATOR .. ",") | dplArgs = dplArgs .. h.appendArg("format", ",,%PAGE%" .. SEPARATOR .. ",") | ||
local result = mw.getCurrentFrame():preprocess("{{#dpl:" .. dplArgs .. "}}") | local result = mw.getCurrentFrame():preprocess("{{#dpl:" .. dplArgs .. "}}") | ||
if not utilsString.endsWith(result, SEPARATOR) then | if not utilsString.endsWith(result, SEPARATOR) then |