Difference between revisions of "Template:=/doc"

From Moegirlpedia
Jump to: navigation, search
(Created page with "{{Quoted from other wikis|Chinese Moegirlpedia|Template:{{=}}}} This template is equivalent to an equal sign: <code>{{=}}</code> == Usage == <pre>{{=}}</pre> == Example ==...")
 
m
Line 1: Line 1:
 
{{Quoted from other wikis|Chinese Moegirlpedia|Template:{{=}}}}
 
{{Quoted from other wikis|Chinese Moegirlpedia|Template:{{=}}}}
  
This template is equivalent to an equal sign: <code>{{=}}</code>
+
This template is equivalent to: <code>{{=}}</code>
  
 
== Usage ==
 
== Usage ==

Revision as of 05:58, 15 May 2020

Template:Quoted from other wikis

This template is equivalent to: =

Usage

{{=}}

Example

Code Result
{{=}} =

Notes

This template is designed to prevent confusion with the = following the parameter name.

As MediaWiki uses the equal sign as a parameter in a template, it might generate an error when a string contains an equal sign.

{{Template Name|<span style="padding:auto 0;"></span>}}
{{tl|=}}

The solution is to use {{=}} instead of an actual equal sign:

{{Template name|<span style{{=}}"padding:auto 0;"></span>}}
{{tl|{{=}}}}

This template may become one of the features of MediaWiki in future versions, so please do not abuse this template and only use it when necessary. Not only can this reduce the impact of future updates, but it can also make your Wikitext look cleaner.