Content deleted Content added
. |
. |
||
Line 5:
local gmatch = mw.ustring.gmatch
local trim = mw.text.trim
end▼
local prefix = 'Wikipedia:Arbitration/Requests/Case/'
Line 44 ⟶ 34:
local fd = sub(pagecontent, fdstart)
local result = {}
local count = 0
local re = '\n==(.-)=='
for str in gmatch(fd, re) do
Line 51 ⟶ 42:
if find(str, '^=') then
s = trim(sub(str, 2))
table.insert(result, '
else
table.insert(result, "'''" .. str .. "'''")
end
count = count + 1
end
return table.concat(result, '\n')▼
local output = ''
mw.log(count)
if (count > 0) then
local div = mw.html.create( 'div' )
div
:css( 'text-align', 'left')
output = tostring( div )
else
output = "''none''"
▲ end
return output
end
Line 67 ⟶ 71:
local pagecontent = mw.title.new(page):getContent()
local result = {}
local count = 0
local re = '\n==(.-)=='
for str in gmatch (pagecontent, re) do
Line 73 ⟶ 78:
or find(str, '^Clarification request') then
table.insert(result, '*[[' .. page .. '#' .. str .. '|' .. str .. ']]')
count = count + 1
end
end
if (count > 0) then
return table.concat(result, '\n')▼
local div = mw.html.create( 'div' )
div
:css( 'text-align', 'left')
output = tostring( div )
else
output = "''none''"
end
return output
end
|