bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function applyEmbeddedRuleset(text, ruleset) {
        var valueMap,
            embedded = text && text.match(embeddedRuleset),
            rules = embedded && embedded[1];

        if (rules) {
            valueMap = {
                "true": 2,  // true is error
                "": 1,      // blank is warning
                "false": 0, // false is ignore
                "info": 3,  // ORION allow info severity
                "3": 3,     // ORION allow info severity
                "2": 2,     // explicit error
                "1": 1,     // explicit warning
                "0": 0      // explicit ignore
            };

            rules.toLowerCase().split(",").forEach(function(rule) {
                var pair = rule.split(":"),
                    property = pair[0] || "",
                    value = pair[1] || "";

                ruleset[property.trim()] = valueMap[value.trim()];
            });
        }

        return ruleset;
    }
function applyEmbeddedRuleset(text, ruleset) {
        var valueMap,
            embedded = text && text.match(embeddedRuleset),
            rules = embedded && embedded[1];

        if (rules) {
            valueMap = {
                "true": 2,  // true is error
                "": 1,      // blank is warning
                "false": 0, // false is ignore
                "info": 3,  // ORION allow info severity
                "3": 3,     // ORION allow info severity
                "2": 2,     // explicit error
                "1": 1,     // explicit warning
                "0": 0      // explicit ignore
            };

            rules.toLowerCase().split(",").forEach(function(rule) {
                var pair = rule.split(":"),
                    property = pair[0] || "",
                    value = pair[1] || "";

                ruleset[property.trim()] = valueMap[value.trim()];
            });
        }

        return ruleset;
    }
function applyEmbeddedRuleset ( text , ruleset ) { var valueMap , embedded = text && text . match ( embeddedRuleset ) , rules = embedded && embedded [ 1 ] ; if ( rules ) { valueMap = { "true" : 2 , // true is error "" : 1 , // blank is warning "false" : 0 , // false is ignore "info" : 3 , // ORION allow info severity "3" : 3 , // ORION allow info severity "2" : 2 , // explicit error "1" : 1 , // explicit warning "0" : 0 // explicit ignore } ; rules . toLowerCase ( ) . split ( "," ) . forEach ( function ( rule ) { var pair = rule . split ( ":" ) , property = pair [ 0 ] || "" , value = pair [ 1 ] || "" ; ruleset [ property . trim ( ) ] = valueMap [ value . trim ( ) ] ; } ) ; } return ruleset ; }
Returns a ruleset object based on embedded rules.
@param {String} text A string of css containing embedded rules.
@param {Object} ruleset A ruleset object to modify.
@return {Object} A ruleset object.
@method getEmbeddedRuleset
Returns a ruleset object based on embedded rules .