Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Template:!

Permanently protected template
From Wikipedia, the free encyclopedia
Magic word documentation[view] [edit] [history] [purge]
This template should have notransclusions. This is because it was replaced with amagic word.

The magic word{{!}} is used to escape avertical bar character "|" inwikitext markup, causing the parser to temporarily not interpret it as a special character.

This used to be a template, but for speed reasons, theMediaWiki parser was changed in July 2014 to instantly interpret{{!}} as "|" and ignore this template, making{{!}} amagic word. You can continue to use the code in exactly the same way as before.

Do not use syntax like{{Template:!}}, and do not supply a parameter, for example{{!|foo}}. In those cases, the template transcludes as an error message:Error: The retired template{{!}} has been transcluded; seemw:Help:Magic words#Other for details. To fix this, use only the code {{!}} to generate the | character.


Usage

The code{{!}} is used toescape the vertical bar character, |, so that it is interpreted later than it would be otherwise. This is mostly useful when trying to include a table in a template. For example,

{{cquote|text=This is text before{|class="wikitable"|+ Caption text|-! Header text!! Header text|-| Example 1|| Example 2|-| Example 3|| Example 4|}This is text after}}

yields nonsense:

This is text before{

— Example 1

However escaping the bars with this magic word and similar templates gives:

{{cquote|text=This is text before{{(!}} class{{=}}"wikitable"{{!+}} Caption text{{!-}}! Header text !! Header text{{!-}}{{!}} Example 1{{!!}} Example 2{{!-}}{{!}} Example 3{{!!}} Example 4{{!)}}This is text after}}


This is text before

Caption text
Header textHeader text
Example 1Example 2
Example 3Example 4

This is text after

For how to include a table in a footnote, do:

Example 1{{refn|group=note|This is a note before}}Example 2{{refn|group=note|1=<nowiki/>This is text before{{(!}} class{{=}}"wikitable"{{!+}} Caption text{{!-}}! Header text !! Header text{{!-}}{{!}} Example 1{{!!}} Example 2{{!-}}{{!}} Example 3{{!!}} Example 4{{!)}}This is text after<nowiki/>}}Example 3{{refn|group=note|This is a note after}}==Notes=={{Reflist|group=note}}

Be careful to follow this formatting,otherwise the table may gobble up the subsequent footnote. This can be unnoticeable if there is only one footnote, only causing an issue if a second footnote is added.

Example 1[note 1]

Example 2[note 2]

Example 3[note 3]

Notes

  1. ^This is a note before
  2. ^This is text before
    Caption text
    Header textHeader text
    Example 1Example 2
    Example 3Example 4

    This is text after

  3. ^This is a note after

See also

This table:
Template call
(m for magic word)
Output (delayed interpretation as wikimarkup)HTML alternative(never interpreted as wikimarkup)
{{!}}(m)|&#124; or{{pipe}}
{{=}}(m)=&#61;
{{!!}}||&#124;&#124;
{{!(}}[&#91;
{{)!}}]&#93;
{{!((}}[[&#91;&#91;
{{))!}}]]&#93;&#93;
{{(}}{&#123;
{{)}}}&#125;
{{((}}{{&#123;&#123;
{{))}}}}&#125;&#125;
{{(((}}{{{&#123;&#123;&#123;
{{)))}}}}}&#125;&#125;&#125;
{{(!}}{|&#123;&#124;
{{!+}}|+&#124;&#43;
{{!-}}|-&#124;&#45;
{{!)}}|}&#124;&#125;

Documentation for the magic word may be found in the MediaWiki documentation atmw:Help:Magic words#Other.

The abovedocumentation istranscluded fromTemplate:!/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://en.wikipedia.org/w/index.php?title=Template:!&oldid=1277088666"
Categories:
Hidden category:

[8]ページ先頭

©2009-2025 Movatter.jp