• Home
  • Random
  • Log in
  • Settings
  • About Safer nicotine wiki
  • Disclaimers
Safer nicotine wiki

Template:nowiki2

  • Language
  • Watch
  • View source
Template documentation[view] [edit] [history] [purge]

Usage

This template uses Lua:
  • Module:LuaCall
  1. {{nowiki2 | TEXT }}
  2. {{nowiki2 | TEXT | tag = TAG }}
  3. {{nowiki2 | TEXT | tag = TAG | style = STYLE }}

Examples

  1. {{nowiki2 | {{infobox}} }} → '"`UNIQ--templatestyles-0000000A-QINU`"'
  2. {{nowiki2 | {{unbulleted list|1=first|2=second}} | tag = pre }} →
     '"`UNIQ--templatestyles-0000000E-QINU`"'<div class="plainlist"><ul><li>first</li><li>second</li></ul></div> 
  3. {{nowiki2|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{{nowiki2 | 0001 }}b → a 0001 b
    1. a{{nowiki2 | 1000 }}b → a 1000 b
    2. a{{nowiki2 |\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. {{nowiki2 | [[Wikipedia]]{{foo}}{{}}{{PAGENAME}}{{{1}}}{{{2|222}}}<ref>ref example 1</ref>&lt;#<>{{=}}{{!}}'" }} → [[Wikipedia]]

{{}}Nowiki2{{{1}}}222'"`UNIQ--ref-0000001A-QINU`"'&lt;#<>=|'"

  1. {{nowiki2 | {{nowiki2| [[Wikipedia]]{{foo}}{{}}{{PAGENAME}}{{{1}}}{{{2|222}}}<ref>ref example 2</ref>&lt;#<>{{=}}{{!}}'" }} }} → &#32;&#91;&#91;Wikipedia&#93;&#93;

&#123;&#123;&#125;&#125;Nowiki2&#123;&#123;&#123;1&#125;&#125;&#125;222&#39;&#34;`UNIQ--ref-0000001D-QINU`&#34;&#39;&#38;lt&#59;#&#60;&#62;&#61;&#124;&#39;&#34;

  1. {{nowiki2 | {{#tag:nowiki| [[Wikipedia]]{{foo}}{{}}{{PAGENAME}}{{{1}}}{{{2|222}}}<ref>ref example 3</ref>&lt;#<>{{=}}{{!}}'" }} }} → '"`UNIQ--nowiki-00000021-QINU`"'
  2. {{#tag:nowiki | {{nowiki2| [[Wikipedia]]{{foo}}{{}}{{PAGENAME}}{{{1}}}{{{2|222}}}<ref>ref example 4</ref>&lt;#<>{{=}}{{!}}'" }} }} → [[Wikipedia]] {{}}Nowiki2{{{1}}}222'"`UNIQ--ref-00000024-QINU`"'&lt;#<>=|'"
  3. {{#tag:nowiki | {{#tag:nowiki| [[Wikipedia]]{{foo}}{{}}{{PAGENAME}}{{{1}}}{{{2|222}}}<ref>ref example 5</ref>&lt;#<>{{=}}{{!}}'" }} }} → [[Wikipedia]] {{}}Nowiki2{{{1}}}222[5]<#<>=|'"
  4. {{#tag:nowiki | [[Wikipedia]]{{foo}}{{}}{{PAGENAME}}{{{1}}}{{{2|222}}}<ref>ref example 6</ref>&lt;#<>{{=}}{{!}}'" }} → [[Wikipedia]] {{}}Nowiki2{{{1}}}222[6]<#<>=|'"

References

  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 }}
The above documentation is transcluded from Template:Nowiki2/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://safernicotine.wiki/mediawiki/index.php?title=Template:Nowiki2&oldid=7795"
Last edited on 2 September 2025, at 01:57
Cookies help us deliver our services. By using our services, you agree to our use of cookies.
More information

Languages

      This page is not available in other languages.

      Safer nicotine wiki
      • This page was last modified on 2 September 2025, at 01:57. Warning: Page may not contain recent updates.
      • Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
      • Privacy policy
      • About Safer nicotine wiki
      • Disclaimers
      • Terms of Use
      • Desktop
      • Data access
      • Developers
      • Statistics
      • Cookie statement