Help:Template: Difference between revisions

Content deleted Content added
Whitespace handling: link to whitespace collapsing and to section in another page describing the use of vertical display of template parameters for readability
fix terminology; template vs template call, parameter vs parameter specification, trim vs collapse
Line 66:
Leading and trailing [[Wikipedia:Whitespace|whitespace]] (including line breaks) around {{em|named}} parameters and values is [[Whitespace collapsing|collapsed]] automatically, but spaces in the middle of the value are kept. For instance, <code><nowiki>{{ ... | myparam = this is a test }}</nowiki></code> has the same output as <code><nowiki>{{ ... |myparam=this is a test}}</nowiki></code>. However, with {{em|unnamed}} parameters, all whitespace is retained as preserved in the output.
 
The trimmingcollapsing of line breaks around parameters can be used to [[Wikipedia:Template namespace#Readability of the code|improve the readability of templatesa template call]] with many parameters, by placing each parameter specification in its own line.
 
==== Variable length parameter lists ====