Template:Sp/doc: Difference between revisions
| [unchecked revision] | [checked revision] |
Content deleted Content added
already in navbox |
Caleb Cooper (talk | contribs) Created page with "{{Documentation subpage}} {{Commons Import}} <!-- PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS PAGE --> ==Usage== {{tlx|sp}} will insert a single, ordinary sp..." |
||
Line 1:
{{Documentation subpage}}
{{Commons Import}}
<!-- PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS PAGE -->
==Usage==
{{tlx|sp}} will insert a single, ordinary space character. It can serve as a human-readable alternative to the <code>&#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]]
<includeonly>{{Sandbox other||
| |||