Module:Convert/tester: Difference between revisions

Content deleted Content added
m typo
check_sandbox includes a diff link
Line 182:
 
local function _check_sandbox(frame, page_pairs)
local function diff_link(title1, title2)
return '<span class="plainlinks">[' ..
tostring(mw.uri.fullUrl('Special:ComparePages',
{ page1 = title1, page2 = title2 })) ..
' diff]</span>'
end
local function link(title)
return '[[' .. title .. ']]'
Line 187 ⟶ 193:
local function message(text, isgood)
local color = isgood and 'green' or 'darkred'
return '<span style="color:' .. color .. ';">' .. text .. '.</span>'
end
local result = collection()
Line 202 ⟶ 208:
label = message('same content', true)
else
label = message('different', false) .. ' (' .. diff_link(title1, title2) .. ')'
end
end
result:add('*' .. link(title1) .. ' • ' .. link(title2) .. ' • ' .. label)
end
return result:join('<br />') .. '\n'
end