وحدة:Wikidata2: الفرق بين النسختين

[نسخة منشورة][نسخة منشورة]
تم حذف المحتوى تمت إضافة المحتوى
طلا ملخص تعديل
ط إضافة إمكانية تحديد عدد المراجع
سطر 886:
 
function formatReferences( statement, options )
local ic
local s
iflocal statementreferences = statement.references then
local reference = {}
local numberofref = tonumber(options.numberofreferences) or 20
if statement.references then
if statementreferences then
local cite = require('وحدة:Cite')
ic = 1
for i, ref in pairs(statement.references statementreferences ) do
local items = {}
if ref.snaks then
if numberofref >= ic then
s = cite.citeitem2(ref , options )
-- s = cite.citeitemciteitem2( items , ref.snaks , ref.hash , options )
if s and s ~= "" then
ic = ic + 1
table.insert(reference, s)
end
end
end
table.insert(reference, s)
end
end