Difference between revisions of "Template:Invoke/doc"

From blackwiki
Jump to navigation Jump to search
imported>Ans
(→‎Example: dumpObject)
imported>Ans
Line 24: Line 24:
 
   arg1   
 
   arg1   
 
|5=named parameter}}
 
|5=named parameter}}
 +
* {<!---->{{{BASEPAGENAME}}|LuaCall|call|mw.dumpObject|&lt;pre>pre text&lt;/pre>}} --> {{{{BASEPAGENAME}}|LuaCall|call|mw.dumpObject|<pre>pre text</pre>}}
 +
* {<!---->{{{BASEPAGENAME}}|LuaCall|call|mw.dumpObject|&lt;nowiki>nowiki text&lt;/nowiki>}} --> {{{{BASEPAGENAME}}|LuaCall|call|mw.dumpObject|<nowiki>nowiki text</nowiki>}}
 +
* {<!---->{{{BASEPAGENAME}}|LuaCall|call|mw.dumpObject|&lt;ref>ref text&lt;/ref>}} --> {{{{BASEPAGENAME}}|LuaCall|call|mw.dumpObject|<ref>ref text</ref>}}
 +
* {<!---->{{{BASEPAGENAME}}|LuaCall|call|mw.dumpObject|&lt;code>code text&lt;/code>}} --> {{{{BASEPAGENAME}}|LuaCall|call|mw.dumpObject|<code>code text</code>}}
 +
* {<!---->{{{BASEPAGENAME}}|LuaCall|call|mw.dumpObject|{<!---->{ping|User1}}}} --> {{{{BASEPAGENAME}}|LuaCall|call|mw.dumpObject|{{ping|User1}}}}
 +
* {<!---->{{{BASEPAGENAME}}|LuaCall|call|mw.dumpObject|<nowiki>[[</nowiki>User:User1]]}} --> {{{{BASEPAGENAME}}|LuaCall|call|mw.dumpObject|[[User:User1]]}}
  
 
<includeonly>{{sandbox other||
 
<includeonly>{{sandbox other||

Revision as of 12:19, 14 November 2019

This template can be used to debug template parameters.

Usage

  • {{Invoke|module name|function name|arguments ...}}

Example

  • {{Invoke|math|random}} --> 0.94492273309497
  • {{Invoke|math|min|9|7|8}} --> 7
  • {{Invoke|LuaCall|call|mw.dumpObject| arg1 |unnamed parameter}} --> " arg1 "
  • {{Invoke|LuaCall|call|mw.dumpObject|4= arg1 |5=named parameter}} --> "arg1"
  • {{Invoke|LuaCall|call|mw.dumpObject| <newline>arg1<newline> |unnamed parameter}} --> " \

arg1\

 "
  • {{Invoke|LuaCall|call|mw.dumpObject|4= <newline>arg1<newline> |5=named parameter}} --> "arg1"
  • {{Invoke|LuaCall|call|mw.dumpObject|<newline> arg1 <newline>|unnamed parameter}} --> "\
 arg1  \

"

  • {{Invoke|LuaCall|call|mw.dumpObject|4=<newline> arg1 <newline>|5=named parameter}} --> "arg1"
  • {{Invoke|LuaCall|call|mw.dumpObject|<pre>pre text</pre>}} --> "'\"`UNIQ--pre-00000000-QINU`\"'"
  • {{Invoke|LuaCall|call|mw.dumpObject|<nowiki>nowiki text</nowiki>}} --> "'\"`UNIQ--nowiki-00000001-QINU`\"'"
  • {{Invoke|LuaCall|call|mw.dumpObject|<ref>ref text</ref>}} --> "'\"`UNIQ--ref-00000002-QINU`\"'"
  • {{Invoke|LuaCall|call|mw.dumpObject|<code>code text</code>}} --> "code text"
  • {{Invoke|LuaCall|call|mw.dumpObject|{{ping|User1}}}} --> "Template:Ping"
  • {{Invoke|LuaCall|call|mw.dumpObject|[[User:User1]]}} --> "User:User1"
  1. ref text