lib/packages/core-classes.js
function(raw_blocks, widget_config) {

		var i = 0,
			count = raw_blocks.length,
			result = [];

		for (; i < count; i++) {

			if (raw_blocks[i].type == 'directive') {
				if (Lava.parsers.Directives.processDirective(raw_blocks[i], widget_config, true)) Lava.t("Directive inside sugar has returned a value: " + raw_blocks[i].name);
			} else {
				result = raw_blocks.slice(i);
				break;
			}

		}

		return result;

	}
function(raw_blocks, widget_config) {

		var i = 0,
			count = raw_blocks.length,
			result = [];

		for (; i < count; i++) {

			if (raw_blocks[i].type == 'directive') {
				if (Lava.parsers.Directives.processDirective(raw_blocks[i], widget_config, true)) Lava.t("Directive inside sugar has returned a value: " + raw_blocks[i].name);
			} else {
				result = raw_blocks.slice(i);
				break;
			}

		}

		return result;

	}
function ( raw_blocks , widget_config ) { var i = 0 , count = raw_blocks . length , result = [ ] ; for ( ; i < count ; i ++ ) { if ( raw_blocks [ i ] . type == 'directive' ) { if ( Lava . parsers . Directives . processDirective ( raw_blocks [ i ] , widget_config , true ) ) Lava . t ( "Directive inside sugar has returned a value: " + raw_blocks [ i ] . name ) ; } else { result = raw_blocks . slice ( i ) ; break ; } } return result ; }
Inside sugar tag there may be directives at the top. Apply them to widget config and cut away
@param {_tRawTemplate} raw_blocks The content inside widget's sugar tag
@param {_cWidget} widget_config The config of the widget being parsed
@returns {_tRawTemplate} New content without directives
Inside sugar tag there may be directives at the top . Apply them to widget config and cut away