Module:User:Anomie/Sandbox
Appearance
From Wikipedia, the free encyclopedia
You might want to create a documentation page for this Scribunto module.
Editors can experiment in this module's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this module.
Editors can experiment in this module's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this module.
localp={} localt=os.time() functionp.bug66798(frame) returnframe:getParent():getTitle() end functionp.bug71971(frame) locala=mw.clone(frame.args) returnframe:expandTemplate{title='User:Anomie/Sandbox2',args=a} end functionp.bug71971_2(frame) localm='' fork,vinpairs(frame:getParent().args)do m=m..tostring(k)..' = '..tostring(v).."\n" end return'<pre>'..m..'</pre>' end localfunctionerror3(txt) error(txt) end localfunctionerror2(txt) error3(txt) end functionp.error(frame) error2(frame.args[1]); end functionp.log(frame) mw.log(frame.args[1]); end localcf=mw.getCurrentFrame(); functionp.testJunk(frame) return'<pre>\n'..mw.dumpObject(mw.getCurrentFrame())..'\n</pre>\n'.. '<pre>\n'..mw.dumpObject(cf)..'\n</pre>\n'; end functionp.testParents(frame) localret={}; localf=frame; whilefdo table.insert(ret,f:getTitle()); f=f:getParent(); end table.insert(ret,'--'); localf=cf; whilefdo table.insert(ret,f:getTitle()); f=f:getParent(); end return'<pre>\n'..table.concat(ret,"\n")..'\n</pre>\n'; end functionp._suppressTemplatestyles(text) localret=string.gsub(text,'127円[^127円]*UNIQ%-%-templatestyles%-%x+%-QINU[^127円]*127円','') returnret end functionp.suppressTemplatestyles(frame) returnp._suppressTemplatestyles(frame.args[1]) end returnp