1
0
mirror of https://github.com/lise-henry/crowbook synced 2024-09-21 08:11:35 +02:00

Make escape_nb_spaces and escape_quotes hidden

This commit is contained in:
Elisabeth Henry 2016-09-29 02:55:55 +02:00
parent e7d5f2b722
commit e78b96212f

View File

@ -26,6 +26,7 @@ const NB_CHAR_EM:char = '\u{2002}'; // demi em space
/// Escape non breaking spaces for HTML, so there is no problem for displaying them if the font or browser
/// doesn't know what to do with them
#[doc(hidden)]
pub fn escape_nb_spaces<'a, S: Into<Cow<'a, str>>>(input: S) -> Cow<'a, str> {
let input = input.into();
if let Some(first) = input.chars().position(|c| match c {
@ -87,6 +88,7 @@ pub fn escape_html<'a, S: Into<Cow<'a, str>>>(input: S) -> Cow<'a, str> {
/// Escape quotes
///
/// Replace `"` by `'`
#[doc(hidden)]
pub fn escape_quotes<'a, S: Into<Cow<'a, str>>>(input: S) -> Cow<'a, str> {
let input = input.into();
if input.contains('"') {