Jump to content

Template talk:T1demo

Add topic
From Meta, a Wikimedia project coordination wiki

Examples

[edit]
Code Resulting wikitext Resulting rendering
{{T1}}
start-{{{1}}}-end
{{T1|a}}
start-a-end
{{subst:T1}}
<!--t1 substituted with 1={{{1}}}-->start{{{1}}}end start{{{1}}}end
{{subst:T1|a}}
<!--t1 substituted with 1=a-->startaend startaend
{{subst:T1|{{{p|q}}}}}
<!--t1 substituted with 1={{{p|q}}}-->start{{{p|q}}}end startqend
{{subst:T1|a<!--b-->c}}
<!--t1 substituted with 1=a<!--b-->c-->starta<!--b-->cend c-->startacend

The last case demonstrates that comments cannot be nested: while a parameter value can contain a comment, here an attempt is made to quote inside a comment such a parameter value. The first closing tag is interpreted as matching the first opening tag, and the rest of the comment with second closing tag is rendered.

Similarly nowiki tags cannot be nested: <nowiki>''a''<nowiki>''b''</nowiki>''c''</nowiki> gives ''a''<nowiki>''b''c</nowiki>. Again, the first closing tag is interpreted as matching the first opening tag, and the rest of the wikitext with second closing tag is treated as being outside nowiki tags.

Nesting of bold inside italics and conversely works fine: abc abc.