Function crowbook_text_processing::escape::nnbsp
[−]
[src]
pub fn nnbsp<'a, S: Into<Cow<'a, str>>>(input: S) -> Cow<'a, str>
Escape narrow non-breaking spaces for HTML.
This is unfortunately sometimes necessary as some fonts/renderers don't support the narrow non breaking space character.
This function works by declaring a span with class "nnbsp" containing the previous and next word, and replacing narrow non breaking space with the non-breaking space character.
Thus, in order to display correctly, you will need to add some style to this span, e.g.:
.nnbsp {
word-spacing: -0.13em;
}