Module:Sandbox/ProcrastinatingReader/three: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 312:
end
 
local replace_macros = function( error_type, s, param_names )
function concat_and_escape( t , sep )
sep = sep or ', '
Line 330:
end
s = mw.ustring.gsub( s, 'paramname', concat_and_escape( k_ar ) )
s = mw.ustring.gsub( s, 'paramandvalue', concat_and_escape( kv_ar ) )
local pandv
if error_type == 'duplicate' then
pandv = concat_and_escape( kv_ar , ' + ')
else
pandv = concat_and_escape( kv_ar )
end
s = mw.ustring.gsub( s, 'paramandvalue', concat_and_escape( kv_ar )pandv )
if mw.getCurrentFrame():preprocess( "{{REVISIONID}}" ) ~= "" then
Line 341 ⟶ 349:
 
local report_params = function( key, param_names )
local res = replace_macros( key, options[key], param_names )
mw.logObject(key)
local res = replace_macros( options[key], param_names )
res = frame:preprocess(res or '')
report = report .. ( res or '' )