模板:nowikitext2
外觀
Usage
[編輯]此模板使用Lua語言: |
{{nowikitext2 | TEXT }}
{{nowikitext2 | TEXT | tag = TAG }}
{{nowikitext2 | TEXT | tag = TAG | style = STYLE }}
Examples
[編輯]- {{nowikitext2 | {{infobox}} }} → '"`UNIQ--templatestyles-00000008-QINU`"'
- {{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>
- {{nowikitext2|tag=pre|style=background-color:#fafad2;|{{URL|www.Example.com}}}} →
<span class="url">[http://www.Example.com www<wbr/>.example<wbr/>.com]</span>
- a{{nowikitext2 | 0001 }}b → a 0001 b
- a{{nowikitext2 | 1000 }}b → a 1000 b
- 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}}
.
- {{nowikitext2 | [[维基百科|Wikipedia]]{{foo}}{{}}{{PAGENAME}}{{{1}}}{{{2|222}}}<ref>ref example 1</ref><#<>{{=}}{{!}}'" }} → [[維基百科|Wikipedia]][[:Template:Foo]]{{}}Nowikitext2{{{1}}}222'"`UNIQ--ref-00000018-QINU`"'<#<>=|'"
- {{nowikitext2 | {{nowiki2| [[维基百科|Wikipedia]]{{foo}}{{}}{{PAGENAME}}{{{1}}}{{{2|222}}}<ref>ref example 2</ref><#<>{{=}}{{!}}'" }} }} →  [[維基百科|Wikipedia]][[:Template:Foo]]{{}}Nowikitext2{{{1}}}222'"`UNIQ--ref-0000001B-QINU`"'&lt;#<>=|'"
- {{nowikitext2 | {{#tag:nowiki| [[维基百科|Wikipedia]]{{foo}}{{}}{{PAGENAME}}{{{1}}}{{{2|222}}}<ref>ref example 3</ref><#<>{{=}}{{!}}'" }} }} → '"`UNIQ--nowiki-0000001F-QINU`"'
- {{#tag:nowiki | {{nowiki2| [[维基百科|Wikipedia]]{{foo}}{{}}{{PAGENAME}}{{{1}}}{{{2|222}}}<ref>ref example 4</ref><#<>{{=}}{{!}}'" }} }} → [[维基百科|Wikipedia]][[:Template:Foo]]{{}}Nowikitext2{{{1}}}222'"`UNIQ--ref-00000022-QINU`"'<#<>=|'"
- {{#tag:nowiki | {{#tag:nowiki| [[维基百科|Wikipedia]]{{foo}}{{}}{{PAGENAME}}{{{1}}}{{{2|222}}}<ref>ref example 5</ref><#<>{{=}}{{!}}'" }} }} → [[维基百科|Wikipedia]][[:Template:Foo]]{{}}Nowikitext2{{{1}}}222[5]<#<>=|'"
- {{#tag:nowiki | [[维基百科|Wikipedia]]{{foo}}{{}}{{PAGENAME}}{{{1}}}{{{2|222}}}<ref>ref example 6</ref><#<>{{=}}{{!}}'" }} → [[维基百科|Wikipedia]][[:Template:Foo]]{{}}Nowikitext2{{{1}}}222[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 }}