Template:Nowrap/doc: Difference between revisions
ArrowHead294 (talk | contribs) mNo edit summary |
ArrowHead294 (talk | contribs) mNo edit summary |
||
Line 1: | Line 1: | ||
{{ | {{dochead}} | ||
{{Wikipedia}} | |||
The <code>{{<nowiki />nowrap}}</code> template stops wrapping of specific text that may happen at spaces, dashes, or parentheses. It is to be used for sections such as units and dates that should always stay together. | |||
=== Usage === | |||
Pass in the text to be held together as a single unnamed parameter. Passing in two or more unnamed parameters will produce individual chunks of non-wrapped text separated by a comma and space. | |||
All leading and trailing whitespaces in the input parameters will be trimmed. | |||
{| class="wikitable" | |||
! You type !! Generated HTML | |||
|- | |||
| <code><nowiki>{{nowrap|10 kg (22 lb)}}</nowiki></code> || <syntaxhighlight lang="html"><span style="white-space: nowrap;">10 kg (22 lb)</span></syntaxhighlight> | |||
|- | |||
| <code><nowiki>{{nowrap| 1 Jan | 2 Feb | 3 Mar }}</nowiki></code> || <syntaxhighlight lang="html"><span style="white-space: nowrap;">1 Jan</span>, <span style="white-space: nowrap;">2 Feb</span>, <span style="white-space: nowrap;">3 Mar</span></syntaxhighlight> | |||
|} | |||
{{escape notice}} | {{escape notice}} |