Ip\Internal\Text\Html2Text::fix_newlines PHP Метод

fix_newlines() защищенный статический Метод

Unify newlines; in particular, \r\n becomes \n, and then \r becomes \n. This means that all newlines (Unix, Windows, Mac) all become \ns.
protected static fix_newlines ( $text ) : string
Результат string the fixed text
    protected static function fix_newlines($text)
    {
        // replace \r\n to \n
        $text = str_replace("\r\n", "\n", $text);
        // remove \rs
        $text = str_replace("\r", "\n", $text);
        return $text;
    }