Template:Avoid wrap/doc

,  or   avoids wrapping of specific text.

To achieve the opposite effect of, you can use. For more information about wrapping and breaking sentences, see Line-break handling.

Usage


The template names Nobr and Nobreak are redirects that may be used instead of "".

Controlling line-breaking in infoboxes
This template may be used with and  to control line-breaking in bulletless lists in infoboxes, to prevent wrapped long entries from being confused with multiple entries. See Template:Wbr/doc for details.

Handling equal-sign or bar
Templates have problems with parameter data that contains equal-signs " " or vertical bars " " (pipes). Note that this does not apply if the equal-sign " " or vertical bar " " is inside a wikilink or another template. In the case that there is a bare equal-sign " " or vertical bar " ", consider using Avoid wrap begin + Avoid wrap end instead. However, there are also other workarounds:

For text that includes an equal-sign "=", precede the text with, use a triple-brace unnamed parameter  , or the   template. For example: , or

which all render as this:

For text that includes a vertical bar "|", escape the bar(s) with " " or " " or " ". For instance, put two bars "|6|" like this:
 * or    or

Which renders this:

Technical details
The actual code that does the job is this HTML span tag that applies a class to the text inside the template:


 * This text will not wrap

When there is not enough remaining space on a line to fit the contents of such as block, it will be pushed to the next line in its entirety. However when the block in itself doesn't fit on a single line, line breaking still applies to the 'internal' text block. This is especially advantageous for mobile rendering where the available line width might be much smaller than on desktops and might require line breaks to make longer words or sections fit.

TemplateData
{ "description": "Prevents word wraps (line breaks) within text or inside a link which contains spaces or hyphens (-).", "params": { "1": {     "label": "Text", "description": "Text or link to be protected.", "type": "string", "required": true } } }