Function crowbook_text_processing::escape::nb_spaces [] [src]

pub fn nb_spaces<'a, S: Into<Cow<'a, str>>>(input: S) -> Cow<'a, str>
Deprecated since 0.2.6

: use nnbsp instead

Escape non breaking spaces for HTML.

This is done so there is no problem for displaying them if the font or browser doesn't know what to do with them (the narrow non breaking space which isn't very well supported).

In order to work correctly, this will require a CSS style with

.nnbsp {
   white-space: nowrap;
}

Else, narrow spaces won't be no-breaking, and that might be ugly.