Module:Convert: Difference between revisions

Content deleted Content added
use Module:Mwlocal instead of mw which may have issues
looks like a global set in a required module no longer works, so don't use it
Line 1,257:
 
local p = {}
-- TODO Replace 'mwlocal' with 'mw' (temporary debugging).
-- Have created Module:Mwlocal (a copy of Module:Mw) to test whether there is
-- The following sets global variable 'mwlocalmw' to simulate what Scribunto will do.
-- a new "mw" component in Scribunto that is causing occasional failures of the
-- mw.local.text.tag() code below.
-- The following sets global variable 'mwlocal' to simulate what Scribunto will do.
local bodge = require(is_test_run and "mwlocal" or "Module:mwlocal") -- fix up mwlocal.text.tag
 
Line 1,274 ⟶ 1,272:
if not success then
local params = {style="color:black; background-color:orange;"}
text = mwlocalbodge.text.tag({name="span", contents="[[Module talk:Convert|Conversion error]]: " .. text, params=params})
end
return text