Difference between revisions of "Template:Tag"

From MINR.ORG WIKI
(Improvement on last change)
(Update via sandbox/testcases (style option, code comprehensibility))
Line 1: Line 1:
<code class="nowrap">{{#switch:{{{2|pair}}}
+
<code class="nowrap" style="{{#switch:{{{style|}}} |plain=border:none;background:transparent; |{{{style|}}} }}"><!--
  |c|close  = <!--nothing-->
+
 
|s|single
+
  Opening tag
|o|open
+
-->{{#switch:{{{2|<!--(else default:)-->pair}}}
|p|pair   = &lt;{{{1|tag}}}{{#if:{{{params|}}}|&#32;{{{params}}}}}
+
    |c|close =
}}{{#switch:{{{2|pair}}}
+
    |s|single
|c|close = {{{content|}}}
+
    |o|open
|s|single = &#32;&#47;&gt;
+
    |p|pair = &lt;{{{1|tag}}}{{#if:{{{params|}}}|&#32;{{{params}}}}}
|o|open   = &gt;{{{content|}}}
+
    }}<!--
|p|pair   = {{#ifeq:{{{1|tag}}}|!--||&gt;}}{{{content|...}}}
+
 
}}{{#switch:{{{2|pair}}}
+
Content between tags
|s|single
+
-->{{#switch:{{{2|pair}}}
|o|open   = <!--nothing-->
+
    |c|close = {{{content|}}}
|c|close
+
    |s|single = &#32;&#47;&gt;
|p|pair   = {{#ifeq:{{{1|tag}}}|!--|--&gt;|&lt;&#47;{{{1|tag}}}&gt;}}
+
    |o|open = &gt;{{{content|}}}
}}</code><noinclude>
+
    |p|pair = {{#ifeq:{{{1|tag}}}|!-- | |&gt;}}{{{content|...}}}
{{documentation}}
+
    }}<!--
 +
 
 +
Closing tag
 +
-->{{#switch:{{{2|pair}}}
 +
    |s|single
 +
    |o|open =
 +
    |c|close
 +
    |p|pair = {{#ifeq:{{{1|tag}}}|!-- |--&gt; |&lt;&#47;{{{1|tag}}}&gt;}}
 +
    }}<!--
 +
 
 +
--></code><noinclude>
 +
{{Documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 14:14, 14 December 2014

<tag>...</tag>

Template documentation[create]