Mòdul:Wikidades/proves: diferència entre les revisions
Contingut suprimit Contingut afegit
només la primera referència |
implementing a max of references |
||
Línia 975:
["P4656"] = true -- Wikimedia import URL
}
local result =
-- traverse through all references
local maxrefs = tonumber(parameters.references) or 1
for ref in pairs(claim.references or {}) do
local refparts
Linha 1.084 ⟶ 1.086:
end
if refparts then
result[#result + 1] = mw.getCurrentFrame():extensionTag("ref", refparts, {name=claim.references[ref].hash})
if maxrefs and maxrefs == #result then break end
end
end
if type(result) == '
end
return mw.text.listToText(result)
end
|