Template:=: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Reverted edits by Nescius (talk) to last revision by Max34)
Tag: Rollback
(Added note that this is a magic word now.)
Line 1: Line 1:
<onlyinclude>=</onlyinclude>
=<noinclude>
== Documentation ==
The expression <code><nowiki>{{=}}</nowiki></code> is used to insert a = character into a template or table where it would otherwise affect or break the formatting of the template/table instead of displaying the character. It is most likely to be used in conjunction with templates like {{T|Note}} or the {{T|Key}} template. See its documentation for further information.
This template is used to insert a = character into a template or table where it would otherwise affect the formatting of the template/table instead of displaying the character. It is most likely to be used in conjunction with the [[Template:Key|Key]] template. See its documentation for further information.
{{Tip|Instead of having to "escape" every single occurrence of an equals sign with {{T|&#61;}} in an unnamed parameter of a template call, it may be easier to use the unnamed parameter like a named parameter.<br>
{{Tip|Instead of "espacing" every occurrence of an equals sign in an unnamed parameter of a template call with {{T|&#61;}}, it may be easier to use the unnamed parameter like a named parameter.<br>
Both of the following deliver {{Code|1=if (i == 0) return count == 0;}}:
Both of the following deliver {{Code|1=if (i == 0) return count == 0;}}:
* {{T|Code|{{P|<nowiki>if (i {{=}}{{=}} 0) return count {{=}}{{=}} 0;</nowiki>}}}}
* {{T|Code|{{P|<nowiki>if (i {{=}}{{=}} 0) return count {{=}}{{=}} 0;</nowiki>}}}}
* {{T|Code|{{P|1|2=if (i == 0) return count == 0;}}}}
* {{T|Code|{{P|1|2=if (i == 0) return count == 0;}}}}
}}
}}
{{note|MediaWiki doesn't use this page. The wikitext <code><nowiki>{{=}}</nowiki></code> is no longer a template call but instead a magic word since [[mw:Help:Magic_words#Escaped_characters|MediaWiki 1.39]]. [[Special:Version|We're above that]] since 2024-11-28. Deleting this page would have no impact, except for new editors trying to search it and not finding the above information.}}


[[Category:Templates for within templates]]
[[Category:Templates for within templates]]

Revision as of 20:31, 17 January 2025

= The expression {{=}} is used to insert a = character into a template or table where it would otherwise affect or break the formatting of the template/table instead of displaying the character. It is most likely to be used in conjunction with templates like {{Note}} or the {{Key}} template. See its documentation for further information.

Tip.pngTip:Instead of having to "escape" every single occurrence of an equals sign with {{=}} in an unnamed parameter of a template call, it may be easier to use the unnamed parameter like a named parameter.

Both of the following deliver if (i == 0) return count == 0;:

  • {{Code|if (i {{=}}{{=}} 0) return count {{=}}{{=}} 0;}}
  • {{Code|1=if (i == 0) return count == 0;}}
Note.pngNote:MediaWiki doesn't use this page. The wikitext {{=}} is no longer a template call but instead a magic word since MediaWiki 1.39. We're above that since 2024-11-28. Deleting this page would have no impact, except for new editors trying to search it and not finding the above information.