Modulo:Sandbox/Sakretsu: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
m correggo
test
Riga 2:
 
function p.main(frame)
local pagecontent = mw.text.trim(frame.args[1] or '')
iflocal pagei == '' then{}
for linkcounter in string.gmatch(content, '{{%s*[Bb]ar7/.-|(.-)}}$%d+') do
return error('Indicare una pagina giornaliera del bar')
i.counter = (i.counter or 0) + 1
content = string.gsub(content, counter, i.counter, 1)
end
ifreturn content then
local ret = {}
local content = mw.title.new(page):getContent()
if content then
for link in string.gmatch(content, '{{%s*[Bb]ar7/.-|(.-)}}') do
if link:find('|') then
link = '[[' .. link:match('^([^|]-|[^|]+)') .. ']]'
else
link = string.format('[[Wikipedia:Bar/Discussioni/%s|%s]]', link, link)
end
table.insert(ret, link)
end
end
if #ret == 0 then
table.insert(ret, '<i>Nessuna discussione.</i>')
end
return '<dl><dd>' .. table.concat(ret, ' &middot; ') .. '</dd></dl>'
end