A
non-breaking space is a way to prevent a piece of text from "breaking" into multiple parts when there's not enough room for it to fit comfortably. This can be useful when formatting tables (I first proposed it here:
Re: Gangs of BitcoinTalk). It can also be useful for signatures, too (e.g. @Royse777 could have used it
recently when improving the ChipMixer signatures,
[nbsp] would have worked better than
[color=transparent].[/color] and could have allowed the design to remain the same; it wouldn't have been necessary to change the "{" into a "#").
Although using the Unicode character (U+00A0) directly is possible, it's much handier (and more "semantic") to make it available as a BBCode tag.
Here's a small patch for @theymos to add
[nbsp] to this version of SMF:
--- /var/www/baseline/Sources/Subs.php 2011-09-17 21:59:55.000000000 +0000
+++ /var/www/modified/Sources/Subs.php 2023-02-20 02:20:01.000000000 +0000
@@ -1389,40 +1389,45 @@
'after' => '
',
'block_level' => true,
),
array(
'tag' => 'me',
'type' => 'unparsed_equals',
'before' => '
* $1 ',
'after' => '
',
'quoted' => 'optional',
'block_level' => true,
'disabled_before' => '/me ',
'disabled_after' => '
',
),
array(
'tag' => 'move',
'before' => '
',
'block_level' => true,
),
+
array(
+
'tag' => 'nbsp',
+
'type' => 'closed',
+
'content' => ' ',
+
),
array(
'tag' => 'nobbc',
'type' => 'unparsed_content',
'content' => '$1',
),
array(
'tag' => 'pre',
'before' => '
',
'after' => '
',
),
array(
'tag' => 'php',
'type' => 'unparsed_content',
'content' => '
$1
',
'validate' => isset($disabled['php']) ? null : create_function('&$tag, &$data, $disabled', '
if (!isset($disabled[\'php\']))
{
$add_begin = substr(trim($data), 0, 5) != \'<?\';
$data = highlight_php_code($add_begin ? \'<?php \' . $data . \'?>\' : $data);
if ($add_begin)
$data = preg_replace(array(\'~^(.+?)<\?.{0,40}?php( |\s)~\', \'~\?>((?:(font|span)>)*)$~\'), \'$1\', $data, 2);