Template:·/doc: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Content added Content deleted
(Some minor fixes of the new documentation.)
(update documentation to reflect the revert to   for now)
Line 42: Line 42:
=== Incorrect usage ===
=== Incorrect usage ===


If the template is used slightly wrong it will in most cases still behave well. For instance if there are no or several spaces after the template. Like these examples:
If the template is used slightly wrong, it will in some cases still behave well. For instance if there are no or several spaces after the template. Like these examples:


<nowiki>[[Salt]]{{&middot;}}[[Pepper]]</nowiki>
<nowiki>[[Salt]]{{&middot;}}[[Pepper]]</nowiki>
Line 60: Line 60:
<nowiki>[[Salt]] {{&middot;}} [[Pepper]]</nowiki>
<nowiki>[[Salt]] {{&middot;}} [[Pepper]]</nowiki>


Then it will still only render just one space on each side of the dot, like this:
Then it will render with two spaces before the dot, and one after, like this:
:[[Salt]] '''&middot;''' [[Pepper]]
:[[Salt]] &nbsp;'''&middot;''' [[Pepper]]


But if it line breaks it might break ''before'' the dot, like this:
If it line breaks it might break ''before'' the dot, like this:
:[[Salt]]
:[[Salt]]
:'''&middot;''' [[Pepper]]
:'''&middot;''' [[Pepper]]
Line 69: Line 69:
=== Technical details ===
=== Technical details ===


The space before the dot is a "non-wrapping" but "collapsing" space. That means it will not line break, but it will collapse together with normal spaces that come before the template to form one single space. It is not simply a <code>&amp;nbsp;</code> since that one will not collapse.
The space before the dot is a [[non-breaking space]]. That means it will not line break and will not collapse together with normal spaces that come before the template.


The space after the dot is a normal space. That is it wraps and it collapses.
The space after the dot is a normal space. That is it wraps and it collapses.