function attemptRender(reporter, filename, src, resolve, reject, globals) {
	globals = globals || {};
	less.render(src, {
		// Specify search paths for @import directives
		paths : [
			"public/static/less"
		],
		// Specify a filename, for better error messages
		filename : filename,
		modifyVars : globals,
		compress : false
	}, function(e, css) {
		if (e) {
			if ((/^variable @(.+?) is undefined$/).test(e.message)) {
				// ignore undef variable
				globals[(/^variable @(.+?) is undefined$/).exec(e.message)[1]] = "1";
				attemptRender(reporter, filename, src, resolve, reject, globals);
				return;
			}
			reporter("LESS", filename, e.line, e.message);
			reject();
			return;
		}
		resolve({
			filename : filename,
			src : css.css || css
		});
	});
}
function attemptRender(reporter, filename, src, resolve, reject, globals) {
	globals = globals || {};
	less.render(src, {
		
		paths : [
			"public/static/less"
		],
		
		filename : filename,
		modifyVars : globals,
		compress : false
	}, function(e, css) {
		if (e) {
			if ((/^variable @(.+?) is undefined$/).test(e.message)) {
				
				globals[(/^variable @(.+?) is undefined$/).exec(e.message)[1]] = "1";
				attemptRender(reporter, filename, src, resolve, reject, globals);
				return;
			}
			reporter("LESS", filename, e.line, e.message);
			reject();
			return;
		}
		resolve({
			filename : filename,
			src : css.css || css
		});
	});
}
function attemptRender ( reporter , filename , src , resolve , reject , globals ) { globals = globals || { } ; less . render ( src , { // Specify search paths for @import directives paths : [ "public/static/less" ] , // Specify a filename, for better error messages filename : filename , modifyVars : globals , compress : false } , function ( e , css ) { if ( e ) { if ( ( / ^variable @(.+?) is undefined$ / ) . test ( e . message ) ) { // ignore undef variable globals [ ( / ^variable @(.+?) is undefined$ / ) . exec ( e . message ) [ 1 ] ] = "1" ; attemptRender ( reporter , filename , src , resolve , reject , globals ) ; return ; } reporter ( "LESS" , filename , e . line , e . message ) ; reject ( ) ; return ; } resolve ( { filename : filename , src : css . css || css } ) ; } ) ; }
Attempt to validate the less file
@param {Function} reporter
@param {String} filename
@param {String} src
@param {Function} resolve
@param {Function} reject
@param {Object} [globals]
Attempt to validate the less file