Modulo:Sandbox/Sakretsu: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
+ |
+ |
||
Riga 1:
local p = {}
function set_error(msg)
return string.format('<span class="error">%s</span>', msg)
end
function p.main(frame)
local
local content = mw.title.new(page):getContent()
local quorum = 0
local
for
table.insert(
local
table.insert(
end
if #
return
end
for _,
content = mw.title.new(
if not content then
return
end
if hash[
return
end
hash[
content = content:gsub('(\n==+ *[^\n]- *==+)', '\r%1')
for heading, section in string.gmatch(content, '\n==+ *([^\n]-) *==+(.-)\r') do
Riga 30 ⟶ 35:
end
end
quorum = math.floor(quorum / 12)
return string.format('Pertanto il quorum per la prossima votazione, calcolato in base al numero di favorevoli e contrari nelle votazioni relative a %s, è pari a <b>%s</b>.',
end
|