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

Examples

編輯
  1. {{nowikitext2 | {{infobox}} }} → '"`UNIQ--templatestyles-00000008-QINU`"'
  2. {{nowikitext2 | {{unbulleted list|1=first|2=second}} | tag = pre }}
     '"`UNIQ--templatestyles-0000000C-QINU`"'<div class="plainlist"><ul><li>first</li><li>second</li></ul></div> 
  3. {{nowikitext2|tag=pre|style=background-color:#fafad2;|{{URL|www.Example.com}}}}
    <span class="url">[http://www.Example.com www<wbr/>.example<wbr/>.com]</span>
  4. a{{nowikitext2 | 0001 }}b → a 0001 b
    1. a{{nowikitext2 | 1000 }}b → a 1000 b
    2. a{{nowikitext2 |\0001}}b → a\0001b

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. {{nowikitext2 | [[维基百科|Wikipedia]]{{foo}}{{}}{{PAGENAME}}{{{1}}}{{{2|222}}}<ref>ref example 1</ref>&lt;#<>{{=}}{{!}}'" }} → [[維基百科|Wikipedia]][[:Template:Foo]]{{}}Nowikitext2/doc{{{1}}}222'"`UNIQ--ref-00000018-QINU`"'&lt;#<>=|'"
  2. {{nowikitext2 | {{nowiki2| [[维基百科|Wikipedia]]{{foo}}{{}}{{PAGENAME}}{{{1}}}{{{2|222}}}<ref>ref example 2</ref>&lt;#<>{{=}}{{!}}'" }} }} → &#32;&#91;&#91;維基百科&#124;Wikipedia&#93;&#93;&#91;&#91;:Template:Foo&#93;&#93;&#123;&#123;&#125;&#125;Nowikitext2/doc&#123;&#123;&#123;1&#125;&#125;&#125;222&#39;&#34;`UNIQ--ref-0000001B-QINU`&#34;&#39;&#38;lt&#59;#&#60;&#62;&#61;&#124;&#39;&#34;
  3. {{nowikitext2 | {{#tag:nowiki| [[维基百科|Wikipedia]]{{foo}}{{}}{{PAGENAME}}{{{1}}}{{{2|222}}}<ref>ref example 3</ref>&lt;#<>{{=}}{{!}}'" }} }} → '"`UNIQ--nowiki-0000001F-QINU`"'
  4. {{#tag:nowiki | {{nowiki2| [[维基百科|Wikipedia]]{{foo}}{{}}{{PAGENAME}}{{{1}}}{{{2|222}}}<ref>ref example 4</ref>&lt;#<>{{=}}{{!}}'" }} }} → [[维基百科|Wikipedia]][[:Template:Foo]]{{}}Nowikitext2/doc{{{1}}}222'"`UNIQ--ref-00000022-QINU`"'&lt;#<>=|'"
  5. {{#tag:nowiki | {{#tag:nowiki| [[维基百科|Wikipedia]]{{foo}}{{}}{{PAGENAME}}{{{1}}}{{{2|222}}}<ref>ref example 5</ref>&lt;#<>{{=}}{{!}}'" }} }} → [[维基百科|Wikipedia]][[:Template:Foo]]{{}}Nowikitext2/doc{{{1}}}222[5]<#<>=|'"
  6. {{#tag:nowiki | [[维基百科|Wikipedia]]{{foo}}{{}}{{PAGENAME}}{{{1}}}{{{2|222}}}<ref>ref example 6</ref>&lt;#<>{{=}}{{!}}'" }} → [[维基百科|Wikipedia]][[:Template:Foo]]{{}}Nowikitext2/doc{{{1}}}222[6]<#<>=|'"

參考資料

  1. ^ ref example 1
  2. ^ ref example 2
  3. ^ ref example 3
  4. ^ ref example 4
  5. ^ ref example 5
  6. ^ 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 }}