Utils/StringUtils.php
/**
     * In French orthography some marks are preceded by a space which can lead to unwanted line breaks
     *
     * @param string $string
     * @param string $replacement
     * @return string
     */
In French orthography some marks are preceded by a space which can lead to unwanted line breaks
@param string $string
@param string $replacement
@return string
In French orthography some marks are preceded by a space which can lead to unwanted line breaks @param string $string @param string $replacement @return string
public static function avoidFrenchLineBreak($string, $replacement = '&nbsp;')
    {
        return preg_replace('~(\x{2009}| )([:!?;…€])~u', $replacement . '$2', $string);
    }
public static function avoidFrenchLineBreak ( $ string , $ replacement = '&nbsp;' ) { return preg_replace ( '~(\x{2009}| )([:!?;…€])~u', $r e l acement . ' 2 , $s t i ng); }
In French orthography some marks are preceded by a space which can lead to unwanted line breaks
 @param string $string
 @param string $replacement
 @return string
In French orthography some marks are preceded by a space which can lead to unwanted line breaks @param string $string @param string $replacement @return string
// first character in expression is thin space U+2009