dist/crocodoc.viewer.js
function processTextContent(text) {
        if (destroyed) {
            return;
        }

        // in the text layer, divs are only used for text boxes, so
        // they should provide an accurate count
        var numTextBoxes = util.countInStr(text, '<div');
        // too many textboxes... don't load this page for performance reasons
        if (numTextBoxes > MAX_TEXT_BOXES) {
            return '';
        }

        // remove reference to the styles
        text = text.replace(/<link rel="stylesheet".*/, '');

        return text;
    }
function processTextContent(text) {
        if (destroyed) {
            return;
        }

        // in the text layer, divs are only used for text boxes, so
        // they should provide an accurate count
        var numTextBoxes = util.countInStr(text, '<div');
        // too many textboxes... don't load this page for performance reasons
        if (numTextBoxes > MAX_TEXT_BOXES) {
            return '';
        }

        // remove reference to the styles
        text = text.replace(/<link rel="stylesheet".*/, '');

        return text;
    }
function processTextContent ( text ) { if ( destroyed ) { return ; } // in the text layer, divs are only used for text boxes, so // they should provide an accurate count var numTextBoxes = util . countInStr ( text , '<div' ) ; // too many textboxes... don't load this page for performance reasons if ( numTextBoxes > MAX_TEXT_BOXES ) { return '' ; } // remove reference to the styles text = text . replace ( / <link rel="stylesheet".* / , '' ) ; return text ; }
Process HTML text and return the embeddable result
@param   {string} text The original HTML text
@returns {string}      The processed HTML text
@private
Process HTML text and return the embeddable result