Module:Sandbox/RexxS/GCI10

-- Module to demo techniques for "Update Template:Reign" for Google-Code-in-2017 -- mw.text.trim( nil ) generates an error

p = {}

-- Example of trim p.trimgood = function( frame ) txt = mw.text.trim( frame.args[1] or "" ) return txt end

p.trimbad = function( frame ) txt = mw.text.trim( frame.args[1] ) return txt end

return p