public function convertLineBreaks($string) {
        if ($this->getConfig('lineBreaks')) {

            // Don't use nl2br() since it leaves a \n
            if ($this->getConfig('xhtmlOutput')) {
                $string = str_replace("\n", '<br/>', $string);
            } else {
                $string = str_replace("\n", '<br>', $string);
            }
        }

        return $string;
    }
public function convertLineBreaks($string) {
        if ($this->getConfig('lineBreaks')) {

            // Don't use nl2br() since it leaves a \n
            if ($this->getConfig('xhtmlOutput')) {
                $string = str_replace("\n", '<br/>', $string);
            } else {
                $string = str_replace("\n", '<br>', $string);
            }
        }

        return $string;
    }
public function convertLineBreaks ( $ string ) { if ( $ this -> getConfig ( 'lineBreaks' ) ) { // Don't use nl2br() since it leaves a \n if ( $ this -> getConfig ( 'xhtmlOutput' ) ) { $ string = str_replace ( "\n" , '<br/>' , $ string ) ; } else { $ string = str_replace ( "\n" , '<br>' , $ string ) ; } } return $ string ; }
Convert newlines to line breaks.

@param string $string
@return string
Convert newlines to line breaks .