Template:Escape template list: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
ArrowHead294 (talk | contribs)
mNo edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
Line 8: Line 8:
</includeonly>
</includeonly>
|-
|-
! scope="col" style="width: 7.0em;" | {{nowrap|Template call}}<includeonly>{{normal|*}}</includeonly> !! scope="col" style="width: 5.75em;" | {{nowrap|Output}}<includeonly>{{normal|**}}</includeonly> !! scope="col" style="width: 9.0em;" | {{nowrap|HTML alternative}}<includeonly>{{normal|***}}</includeonly>
! scope="col" style="width: 7.0em;" | {{nowrap|Template call}}<includeonly>{{normal|&#42;}}</includeonly> !! scope="col" style="width: 5.75em;" | {{nowrap|Output}}<includeonly>{{normal|&#42;&#42;}}</includeonly> !! scope="col" style="width: 9.0em;" | {{nowrap|HTML alternative}}<includeonly>{{normal|&#42;&#42;&#42;}}</includeonly>
|-
|-
| <code>{{((}}&#33;{{))}}</code> '''(m)''' || {{pipe}} || <code>&amp;#124;</code> or {{tl|pipe}}
| <code>{{((}}&#33;{{))}}</code> '''(m)''' || {{pipe}} || <code>&amp;#124;</code> or {{tl|pipe}}
Line 53: Line 53:
<includeonly>
<includeonly>
|- style="border-top: double;"
|- style="border-top: double;"
| colspan="3" style="text-align: left; font-size: 0.75em;" | *&thinsp;'''m''' for magic word<br />**&thinsp;Delayed interpretation as wikimarkup<br />***&thinsp;Never interpreted as wikimarkup
| colspan="3" style="text-align: left; font-size: 0.75em;" | &#42;&thinsp;'''m''' for magic word<br />&#42;&#42;&thinsp;Delayed interpretation as wikimarkup<br />&#42;&#42;&#42;&thinsp;Never interpreted as wikimarkup
</includeonly>
</includeonly>
|}<noinclude>
|}<noinclude>

Revision as of 12:36, 19 August 2024

These characters and character sequences have special meanings in Wiki markup. Sometimes, they need to be escaped, and these templates are used to do so.

Note that if you escape these characters using the templates, they will still be interpreted as Wiki markup, while if you escape them with HTML entities they will never be interpreted as Wiki markup.

Template call Output HTML alternative
{{!}} (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;
{{^(}} < &#60; or &lt;
{{)^}} > &#62; or &gt;
{{^((}} << &#60;&#60; or &lt;&lt;
{{))^}} >> &#62;&#62; or &gt;&gt;
Template documentation[view] [edit] [history] [purge]
English Wikipedia has an article on:

Certain characters and character sequences have special meanings in Wiki markup. Sometimes, they need to be escaped, and these templates are used to do so.

Escaping these characters using templates simply delays their interpretation as Wiki markup, but if you type them using HTML entities or wrap them in <nowiki> tags, they will never be interpreted as markup.

Note: These escape templates should only be used when absolutely necessary, as overuse of such templates can make pages hard to read and edit in the source editor.

Usage

These templates are used to escape special character sequences, so that they are interpreted later than they would otherwise be. They are most useful when trying to include tables within other tables or templates.

The following example shows an instance of including a Wikitable within another Wikitable. This markup:

{| class="wikitable" style="text-align: center;"
|+ style="font-size: 105%;" | Caption text
|-
! Header text !! Header text
|-
| Example 1 || Example 2
|-
| Example 3 || Example 4
|-
| colspan="2" | {{(!}} class{{=}}"wikitable" style{{=}}"text-align: center;"
{{!+}} style{{=}}"font-size: 105%;" {{!}} Caption text
{{!-}}
! Header text !! Header text
{{!-}}
{{!}} Example 5 {{!!}} Example 6
{{!-}}
{{!}} Example 7 {{!!}} Example 8
{{!)}}
|}

gives:

Caption text
Header text Header text
Example 1 Example 2
Example 3 Example 4
Caption text
Header text Header text
Example 5 Example 6
Example 7 Example 8