Module:MultiReplace: Difference between revisions

Content deleted Content added
m Changed protection level for "Module:MultiReplace": High-risk Lua module: allow extended confirmed editors to edit ([Edit=Require extended confirmed access] (indefinite))
No reason to call a template that calls a module that calls mw.html.create. Just call mw.html.create directly.
Line 11:
local change = {pattern = args[i * 2], repl = args[i * 2 + 1]}
if not change.repl then
return tostring(mw.html.create("strong"):addClass('error')
return frame:expandTemplate{
args = { :wikitext('Multireplace: Unpaired argument: <code>' .. (i * 2) .. ' = ' .. change.pattern .. '</code>' })
title = 'Error',
)
args = { 'Multireplace: Unpaired argument: <code>' .. (i * 2) .. ' = ' .. change.pattern .. '</code>' }
}
end
changeList[i] = change