src/utils/ExtensionUtils.js
function parseLessCode(code, url) {
        var result = new $.Deferred(),
            options;

        if (url) {
            var dir = url.slice(0, url.lastIndexOf("/") + 1);

            options = {
                filename: url,
                rootpath: dir
            };

            if (isAbsolutePathOrUrl(url)) {
                options.currentFileInfo = {
                    currentDirectory: dir,
                    entryPath: dir,
                    filename: url,
                    rootFilename: url,
                    rootpath: dir
                };
            }
        }

        less.render(code, options, function onParse(err, tree) {
            if (err) {
                result.reject(err);
            } else {
                result.resolve(tree.css);
            }
        });

        return result.promise();
    }
function parseLessCode(code, url) {
        var result = new $.Deferred(),
            options;

        if (url) {
            var dir = url.slice(0, url.lastIndexOf("/") + 1);

            options = {
                filename: url,
                rootpath: dir
            };

            if (isAbsolutePathOrUrl(url)) {
                options.currentFileInfo = {
                    currentDirectory: dir,
                    entryPath: dir,
                    filename: url,
                    rootFilename: url,
                    rootpath: dir
                };
            }
        }

        less.render(code, options, function onParse(err, tree) {
            if (err) {
                result.reject(err);
            } else {
                result.resolve(tree.css);
            }
        });

        return result.promise();
    }
function parseLessCode ( code , url ) { var result = new $ . Deferred ( ) , options ; if ( url ) { var dir = url . slice ( 0 , url . lastIndexOf ( "/" ) + 1 ) ; options = { filename : url , rootpath : dir } ; if ( isAbsolutePathOrUrl ( url ) ) { options . currentFileInfo = { currentDirectory : dir , entryPath : dir , filename : url , rootFilename : url , rootpath : dir } ; } } less . render ( code , options , function onParse ( err , tree ) { if ( err ) { result . reject ( err ) ; } else { result . resolve ( tree . css ) ; } } ) ; return result . promise ( ) ; }
Parses LESS code and returns a promise that resolves with plain CSS code.

Pass the {@link url} argument to resolve relative URLs contained in the code.
Make sure URLs in the code are wrapped in quotes, like so:
background-image: url("image.png");

@param {!string} code LESS code to parse
@param {?string} url URL to the file containing the code
@return {!$.Promise} A promise object that is resolved with CSS code if the LESS code can be parsed
Parses LESS code and returns a promise that resolves with plain CSS code .