Content deleted Content added
Carry out edit request from User:Snævar with some further optimization |
minor tweak so that the qid parameter works |
||
Line 1:
-- Version: 2021-
local p = {}
Line 315:
table.sort(keys) -- as they might be out of order
for i, k in ipairs(keys) do
out[k] = out[k]:gsub (''', '\''); -- prevent cs1|2 multiple names categorization; replace html entity with the actual character
mw.log(i .. " " .. k .. " " .. (out[k]))
if args[nl_type .. i] then -- name gets overwritten
Line 393 ⟶ 394:
-- parameters that don't get passed to Citation
local expand = citeq_args.expand -- when set to anything, causes {{cite q}} to render <code><nowiki>{{citation|...}}</nowiki></code>
local qid = citeq_args
local wdl = citeq_args.wdl
local template = citeq_args.template
Line 637 ⟶ 638:
-- template is CS1 designator: journal, web, news, etc.
if template then
-- citeq_args.mode = citeq_args.mode or "cs1" -- a cs1 template already knows that it is cs1 so this line is superfluous
template = "Cite " .. template
else
-- citeq_args.mode = citeq_args.mode or "cs2" -- a cs2 template already knows that it is cs2 so this line is superfluous
template = "Citation"
end
|