Content deleted Content added
Undid revision 992689351 by ProcrastinatingReader (talk) |
No edit summary |
||
Line 313:
local replace_macros = function( s, param_names )
function concat_and_escape( t
local s = table.concat( t, sep )
return ( mw.ustring.gsub( s, '%%', '%%%%' ) )
end
Line 322 ⟶ 323:
for k, v in pairs( param_names ) do
table.insert( k_ar, k )
mw.logObject(k)▼
mw.logObject(v)▼
if type(v) == 'table' then
v = table.concat(v, ', ')
Line 330 ⟶ 329:
table.insert( kv_ar, k .. ': ' .. v)
end
s = mw.ustring.gsub( s, 'paramname', concat_and_escape( k_ar ) )
s = mw.ustring.gsub( s, 'paramandvalue', concat_and_escape( kv_ar ) )
|