lib/utils/utils.js
function getConditionalComment(comment, modify, options) {
    var START_IF = '^\\s*\\[if .*\\]>',
        END_IF = '<!\\[endif\\]\\s*$',
        matchedStartIF = comment.match(new RegExp(START_IF)),
        matchedEndIF = comment.match(new RegExp(END_IF));

    if (comment.match(new RegExp(START_IF + '\\s*$')) || comment.match(new RegExp(START_IF + '<!\\s*$')) ||
            comment.match(new RegExp('^' + END_IF))) {
        return comment.trim();
    }

    if (matchedStartIF && matchedEndIF) {
        var start = matchedStartIF[0],
            end = matchedEndIF[0],
            modified = modify(comment.substring(start.length, matchedEndIF.index), options);

        return (start + modified + end).trim();
    }
}
function getConditionalComment(comment, modify, options) {
    var START_IF = '^\\s*\\[if .*\\]>',
        END_IF = '<!\\[endif\\]\\s*$',
        matchedStartIF = comment.match(new RegExp(START_IF)),
        matchedEndIF = comment.match(new RegExp(END_IF));

    if (comment.match(new RegExp(START_IF + '\\s*$')) || comment.match(new RegExp(START_IF + '<!\\s*$')) ||
            comment.match(new RegExp('^' + END_IF))) {
        return comment.trim();
    }

    if (matchedStartIF && matchedEndIF) {
        var start = matchedStartIF[0],
            end = matchedEndIF[0],
            modified = modify(comment.substring(start.length, matchedEndIF.index), options);

        return (start + modified + end).trim();
    }
}
function getConditionalComment ( comment , modify , options ) { var START_IF = '^\\s*\\[if .*\\]>' , END_IF = '<!\\[endif\\]\\s*$' , matchedStartIF = comment . match ( new RegExp ( START_IF ) ) , matchedEndIF = comment . match ( new RegExp ( END_IF ) ) ; if ( comment . match ( new RegExp ( START_IF + '\\s*$' ) ) || comment . match ( new RegExp ( START_IF + '<!\\s*$' ) ) || comment . match ( new RegExp ( '^' + END_IF ) ) ) { return comment . trim ( ) ; } if ( matchedStartIF && matchedEndIF ) { var start = matchedStartIF [ 0 ] , end = matchedEndIF [ 0 ] , modified = modify ( comment . substring ( start . length , matchedEndIF . index ) , options ) ; return ( start + modified + end ) . trim ( ) ; } }
Processes a conditional comment
@param {String} comment
@param {Function} modify
@param {Object} options
@returns {String|undefined}
Processes a conditional comment