Template:Nnbsp/doc

From Angelina Jordan Wiki
Revision as of 23:07, 13 July 2024 by Dcljr (talk | contribs) (the truth)
This is a subpage documenting Template:Nnbsp. To change the template, edit that page; to change the template's documentation (seen below), edit this one.

Documentation

This template produces a narrow non-breaking space (optionally between two specified inputs — see the examples below). It is the narrow-space equivalent of {{nbsp}}.

The name of this template is based on the phrase "narrow non-breaking space" or "narrow non-break space".

Usage

  • {{nnbsp}}
  • {{nnbsp|text before space|text after space}}
  • {{nnbsp|text to be ignored by the template}}

Note that if only one input is given, that input is ignored. This feature can be used to provide comments to future editors, but that might be a little confusing.

Examples

  • "California Dreamin'{{nnbsp}}" ⇒ "California Dreamin' "
  • "California Dreamin'{{nnbsp|narrow non-breaking space}}" ⇒ "California Dreamin' "
  • ({{nnbsp}}[note]{{nnbsp}}) ⇒ ( [note] )
  • {{nnbsp|2|km}} ⇒ 2 km
  • 2{{nnbsp}}km ⇒ 2 km

The first two examples have the same output, as do the last two.

Here's a comparison of the regular-width non-breaking space with its narrow counterpart:

  • <span style="background-color:black">&nbsp;</span>
  • <span style="background-color:black">{{nnbsp}}</span>

 ⇒ 
 ⇒