public/js/vendor/beautify/beautify.js
function split_newlines(s) {
            //return s.split(/\x0d\x0a|\x0a/);

            s = s.replace(/\x0d/g, '');
            var out = [],
                idx = s.indexOf("\n");
            while (idx !== -1) {
                out.push(s.substring(0, idx));
                s = s.substring(idx + 1);
                idx = s.indexOf("\n");
            }
            if (s.length) {
                out.push(s);
            }
            return out;
        }
function split_newlines(s) {
            //return s.split(/\x0d\x0a|\x0a/);

            s = s.replace(/\x0d/g, '');
            var out = [],
                idx = s.indexOf("\n");
            while (idx !== -1) {
                out.push(s.substring(0, idx));
                s = s.substring(idx + 1);
                idx = s.indexOf("\n");
            }
            if (s.length) {
                out.push(s);
            }
            return out;
        }
function split_newlines ( s ) { //return s.split(/\x0d\x0a|\x0a/); s = s . replace ( / \x0d / g , '' ) ; var out = [ ] , idx = s . indexOf ( "\n" ) ; while ( idx !== - 1 ) { out . push ( s . substring ( 0 , idx ) ) ; s = s . substring ( idx + 1 ) ; idx = s . indexOf ( "\n" ) ; } if ( s . length ) { out . push ( s ) ; } return out ; }
we could use just string.split, but IE doesn't like returning empty strings
we could use just string . split but IE doesn t like returning empty strings