Content deleted Content added
. |
. |
||
(11 intermediate revisions by the same user not shown) | |||
Line 5:
local gmatch = mw.ustring.gmatch
local trim = mw.text.trim
end▼
local prefix = 'Wikipedia:Arbitration/Requests/Case/'
local ptalk = 'Wikipedia talk:Arbitration/Requests/Case/'
function render ( tbl, count )
local div = mw.html.create( 'div' )
div
:css( 'text-align', 'left' )
:wikitext( '<p>\n' .. table.concat(tbl, '</p><p>\n') .. '</p>\n' )
output = tostring( div )
else
output = "''none''"
end
return output▼
▲end
function p.dates( frame )
Line 29 ⟶ 33:
local re = '\n<big>(.-)</big>'
for str in gmatch (pagecontent, re) do
table.insert(result,
end
return
end
Line 41 ⟶ 45:
local page = prefix .. case
local pagecontent = mw.title.new(page):getContent()
local fdstart = find(pagecontent, '\n=%s*Final decision')
local fd = sub(pagecontent, fdstart)
local result = {}
local count = 0
local re = '\n==(.-)=='
for str in gmatch(fd, re) do
if find(str, '^%s*Enforcement') then
end▼
▲ if find(str, '^=') then
s = trim(sub(str, 2))▼
table.insert(result, '*[[' .. page .. '#' .. s .. '|' .. s .. ']]')▼
else
if find(str, '^=') then
table.insert(result, "'''" .. str .. "'''")▼
▲ s = trim(sub(str, 2))
else
▲ table.insert(result, "'''" .. str .. "'''")
▲ end
count = count + 1
end
end
▲ local output = table.concat(result, '\n')
return render ( result, count )
▲ return output
end
Line 69 ⟶ 75:
local pagecontent = mw.title.new(page):getContent()
local result = {}
local count = 0
local re = '\n==(.-)=='
for str in gmatch (pagecontent, re) do
Line 74 ⟶ 81:
if find(str, '^Amendment request')
or find(str, '^Clarification request') then
table.insert(result, '
count = count + 1
end
end
return
end
function p.sections( frame )
local case = frame.args[1] or frame.args.case
▲ return p._sections( case, delim )
end
function p._sections( case
local page = prefix .. case
local talkpage = ptalk .. case
Line 113 ⟶ 120:
add('Proposed decision')
return table.concat(result,
end
|