Template:Invoke/doc

From Meta Wiki
Revision as of 23:51, 19 January 2022 by mh>DarkMatterMan4500 (Created page with "{{Documentation subpage}} {{lua|Module:LuaCall}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see Wikipedia:Wikidata) --> This template can be used to debug template parameters. == Usage == * {<!---->{{{BASEPAGENAME}}|''module name''|''function name''|''arguments ...''}} == Example == * {<!---->{{{BASEPAGENAME}}|math|random}} --> {{{{BASEPAGENAME}}|math|random}} * {<!---->{{{BASEPAGENAME}}|math|min|9|7|8}} -->...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Lua error: bad argument #1 to "get" (not a valid title).

This template can be used to debug template parameters.

Usage

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

Example

  • {{Invoke|math|random}} --> 0.9035741337126
  • {{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|&lt;&gt;}} {{Invoke|LuaCall|call|mw.logObject|&lt;&gt;}} {{Invoke|LuaCall|call|mw.text.nowiki|&lt;&gt;}} --> "<>" &lt;&gt;
  • {{Invoke|LuaCall|call|mw.text.nowiki|<pre>pre text</pre>}} --> '"`UNIQ--pre-00000004-QINU`"'
  • {{Invoke|LuaCall|call|mw.text.nowiki|<nowiki>nowiki text</nowiki>}} --> '"`UNIQ--nowiki-00000005-QINU`"'
  • {{Invoke|LuaCall|call|mw.text.nowiki|<ref>ref text</ref>}} --> '"`UNIQ--ref-00000006-QINU`"'
  • {{Invoke|LuaCall|call|mw.text.nowiki|<code>code text</code>}} --> <code>code text</code>
  • {{Invoke|LuaCall|call|mw.text.nowiki|<syntaxhighlight lang=php>source text</syntaxhighlight>}} --> '"`UNIQ--syntaxhighlight-00000007-QINU`"'
  • {{Invoke|LuaCall|call|mw.text.nowiki|{{ping|User1}}}} --> <span class="template-ping">@[[User:User1|User1]]:</span>
  • {{Invoke|LuaCall|call|mw.text.nowiki|[[User:User1]]}} --> [[User:User1]]
  • {{Invoke|LuaCall|call|mw.text.nowiki|<ref>ref then <nowiki>nowiki</nowiki></ref>}} --> '"`UNIQ--ref-0000000A-QINU`"'
  • {{Invoke|LuaCall|call|mw.text.nowiki|<pre>pre then <nowiki>nowiki</nowiki></pre>}} --> '"`UNIQ--pre-0000000B-QINU`"'
  • {{Invoke|LuaCall|call|mw.text.nowiki|{{replace|<tag>tag text</tag>|tag|pre}}{{replace|<tag>tag text</tag>|tag|nowiki}}{{replace|<tag>tag text</tag>|tag|ref}}{{replace|<tag>tag text</tag>|tag|code}}{{replace|1=<tag lang=php>tag text</tag>|2=tag|3=syntaxhighlight}}}} --> [[:Template:Replace]][[:Template:Replace]][[:Template:Replace]][[:Template:Replace]][[:Template:Replace]]
  • {{Invoke|LuaCall|call|mw.text.nowiki|4={{1x|<}}pre>pre text</pre>{{1x|<}}nowiki>nowiki text</nowiki>{{1x|<}}ref>ref text</ref>{{1x|<}}code>code text</code>{{1x|<}}syntaxhighlight lang=php>source text</syntaxhighlight>}} --> [[:Template:1x]]pre>pre text</pre>[[:Template:1x]]nowiki>nowiki text</nowiki>[[:Template:1x]]ref>ref text</ref>[[:Template:1x]]code>code text</code>[[:Template:1x]]syntaxhighlight lang=php>source text</syntaxhighlight>


  1. ref text
  2. ref then nowiki