Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 01330ec25d
Fetching contributors…

Cannot retrieve contributors at this time

56 lines (44 sloc) 1.576 kb
__NAME__ purpose
replace all spaces (" ") with nonbreakable space (" ") characters
__END__
__NAME__ see also
space_to_null, lspace_to_nbsp
__END__
__NAME__ description
The filter replaces all space ("<literal> </literal>") characters
with &glos-HTML;'s nonbreakable-space ("<literal>&amp;nbsp;</literal>")
characters.
</para><para>
This is useful for places where you want strings to appear in a single
line, without word-wrapping to the next line.
__END__
__NAME__ notes
In &glos-HTML;, multiple spaces in a line render as just one space on the
screen. When the spaces are converted to "&amp;nbsp;", however, every
nonbreakable space will produce one space character on the screen &mdash;
it's how &glos-HTML; works.
Use the &glos-filter;'s <option>compress</option> when you want to
preserve the behavior of only one space being visible on the screen.
__END__
__NAME__ online: Filter example
<programlisting><![CDATA[
<div style="width: 80px;">
This is a very small DIV and will surely word-wrap this text to multiple lines.
With the filter applied, however, it will force the DIV to stretch and render as single line.
</div>
<div style="width: 80px;">
[filter space_to_nbsp]
With the filter applied, however, it will force the DIV to stretch and render as single line.
[/filter]
</div>
]]></programlisting>
__END__
__NAME__ online: Filter example
<programlisting><![CDATA[
<div>
[filter space_to_nbsp.compress]
Multiple spaces in a line will render as just single space.
[/filter]
</div>
]]></programlisting>
__END__
Jump to Line
Something went wrong with that request. Please try again.