Text_Highlighter_Renderer_Array::preprocess PHP Метод

preprocess() публичный Метод

Preprocesses code
public preprocess ( string $str ) : string
$str string Code to preprocess
Результат string Preprocessed code
    function preprocess($str)
    {
        // normalize whitespace and tabs
        $str = str_replace("\r\n", "\n", $str);
        $str = str_replace("\r", "\n", $str);
        // some browsers refuse to display empty lines
        $str = preg_replace('~^$~m', " ", $str);
        $str = str_replace("\t", str_repeat(' ', $this->_tabsize), $str);
        return rtrim($str);
    }