Template:Sp/doc: Difference between revisions

[unchecked revision][checked revision]
Content deleted Content added
already in navbox
 
m 1 revision imported
 
(One intermediate revision by the same user not shown)
Line 1:
{{Documentation subpage}}
{{Commons Import}}
 
<!-- PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS PAGE -->
{{distinguish|template:sp?}}
 
==Usage==
{{tlx|sp}} will insert a single, ordinary space character. It can serve as a human-readable alternative to the <code>&amp;#32;</code> [[Wikipedia:numeric character reference|numeric character reference]].
 
===Anywhere you need a regular space===
Line 10 ⟶ 11:
 
===Inserting a space inside a parser function===
Sometimes when using [[Wikipedia:Help:parser functions|parser functions]], you need to insert a space at the beginning or end of an optional message. {{tl|sp}} can be used for that purpose. In the following examples, look closely at the spacing between words and punctuation to see the subtle differences.
 
;Example
Line 28 ⟶ 29:
 
===Disabling default substitution===
Suppose you have a template, {{tl|Example}}, that uses [[Wikipedia:WP:substitution|substitution]], like this:
<nowiki>{{{{{subst|subst:}}}#if{{{condition|}}}|message}}</nowiki>
When the template is [[Wikipedia:WP:Transclusion|transcluded]] and saved, the result would be interpreted as:
<nowiki>{{subst:#if{{{condition|}}}|message}}</nowiki>
 
Line 50 ⟶ 51:
 
==See also==
For documentation see wikipedia page [[wikipedia:Template:Sp]]
* {{tlx|fdw-iw}} – a template that uses {{tl|sp}} with parser functions
 
* {{tlx|verify spelling}} – for spelling issues
{{Inline spacing templates}}
 
<includeonly>{{Sandbox other||