Template:nowiki2/doc

From HandWiki
< Template:Nowiki2
Revision as of 18:58, 19 February 2021 by imported>Jworkorg (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Usage

  1. {{nowiki2 | TEXT }}
  2. {{nowiki2 | TEXT | tag = TAG }}
  3. {{nowiki2 | TEXT | tag = TAG | style = STYLE }}

Examples

  1. {{nowiki2 | {{infobox}} }}Script error: No such module "LuaCall".
  2. {{nowiki2 | {{unbulleted list|1=first|2=second}} | tag = pre }}
    Script error: No such module "LuaCall".
  3. {{nowiki2|tag=pre|style=background-color:#fafad2;|{{URL|www.Example.com}}}}
    Script error: No such module "LuaCall".
  4. a{{nowiki2 | 0001 }}b → aScript error: No such module "LuaCall".b
    1. a{{nowiki2 | 1000 }}b → aScript error: No such module "LuaCall".b
    2. a{{nowiki2 |\0001}}b → aScript error: No such module "LuaCall".b

Since this template use Lua function mw.text.nowiki() rather than {{#tag:nowiki}}, the following examples will show the difference between this template and {{#tag:nowiki}}.

  1. {{nowiki2 | [[Wikipedia]]{{foo}}{{}}{{PAGENAME}}{{{1}}}{{{2|222}}}<ref>ref example 1</ref>&lt;#<>{{=}}{{!}}'" }}Script error: No such module "LuaCall".
  2. {{nowiki2 | {{nowiki2| [[Wikipedia]]{{foo}}{{}}{{PAGENAME}}{{{1}}}{{{2|222}}}<ref>ref example 2</ref>&lt;#<>{{=}}{{!}}'" }} }}Script error: No such module "LuaCall".
  3. {{nowiki2 | {{#tag:nowiki| [[Wikipedia]]{{foo}}{{}}{{PAGENAME}}{{{1}}}{{{2|222}}}<ref>ref example 3</ref>&lt;#<>{{=}}{{!}}'" }} }}Script error: No such module "LuaCall".
  4. {{#tag:nowiki | {{nowiki2| [[Wikipedia]]{{foo}}{{}}{{PAGENAME}}{{{1}}}{{{2|222}}}<ref>ref example 4</ref>&lt;#<>{{=}}{{!}}'" }} }} → <strong class="error"><span class="scribunto-error" id="mw-scribunto-error-10">Script error: No such module "LuaCall".</span></strong>
  5. {{#tag:nowiki | {{#tag:nowiki| [[Wikipedia]]{{foo}}{{}}{{PAGENAME}}{{{1}}}{{{2|222}}}<ref>ref example 5</ref>&lt;#<>{{=}}{{!}}'" }} }} → [[Wikipedia]][[:Template:Foo]]{{}}Nowiki2/doc{{{1}}}222[1]<#<>=|'"
  6. {{#tag:nowiki | [[Wikipedia]]{{foo}}{{}}{{PAGENAME}}{{{1}}}{{{2|222}}}<ref>ref example 6</ref>&lt;#<>{{=}}{{!}}'" }} → [[Wikipedia]][[:Template:Foo]]{{}}Nowiki2/doc{{{1}}}222[2]<#<>=|'"

References

  1. ref example 5
  2. ref example 6

Nowiki templates and modules

Templates and modules that implement <nowiki>TEXT</nowiki>

  • {{nowiki}} - usage: {{nowiki | TEXT }}
  • {{nowiki2}} - usage: {{nowiki2 | TEXT | tag = TAG | style = STYLE }}
  • Module:String2 nowiki(TEXT) - usage: {{#invoke:String2 | nowiki | TEXT }}