Template:Nnbsp/doc

From Angelina Jordan Wiki
Revision as of 01:58, 21 June 2024 by Dcljr (talk | contribs) (update docs)
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 the template is based on the phrase "narrow non-breaking space" (or "narrow no-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 are equivalent, as are the last two.

For comparison with the regular-width non-breaking space:

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

 ⇒ 
 ⇒