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
break
end
end
if type(result) == 'stringtable' and #result ~= "">0 and isSet(i18n.categoryref) then
resultreturn = mw.text.listToText(result) .. "[[" ..i18n.categoryref .. "]]"
end
return mw.text.listToText(result)
end