static/node_modules/grunt-bake/tasks/bake.js
// For inline-bake it searches for matching closing tags and returns inline content and other information
For inline-bake it searches for matching closing tags and returns inline content and other information
For inline - bake it searches for matching closing tags and returns inline content and other information
function extractSection( content ) {
			var depth = 0;			
			var start = 0;			
			var position = 0;		
			var length = 0;			
			var remain = content;	
			var section = {};
			do {
				var result = remain.match( regex );
				if( ! result ) break;
				length = result[ 0 ].length;
				position += result.index;
				if( depth === 0 ) {
					start = position + length;
					section = mout.object.merge( section, parseSignature( result[ 4 ] ), {
						before: content.slice( 0, position ),
						linebreak: result[ 1 ],
						indent: result[ 2 ]
					} );
				}
				remain = remain.slice( result.index + length );
				depth += ( result[ 3 ] === "-start" );
				depth -= ( result[ 3 ] === "-end" );
				if( depth === 0 ) {
					return mout.object.merge( section, {
						inner: content.slice( start, position ),
						after: content.slice( position + length )
					} );
				}
				position += length;
			} while( true );
			return null;
		}
function extractSection ( content ) { var depth = 0 ; var start = 0 ; var position = 0 ; var length = 0 ; var remain = content ; var section = { } ; do { var result = remain . match ( regex ) ; if ( ! result ) break ; length = result [ 0 ] . length ; position += result . index ; if ( depth === 0 ) { start = position + length ; section = mout . object . merge ( section , parseSignature ( result [ 4 ] ) , { before : content . slice ( 0 , position ) , linebreak : result [ 1 ] , indent : result [ 2 ] } ) ; } remain = remain . slice ( result . index + length ) ; depth += ( result [ 3 ] === "-start" ) ; depth -= ( result [ 3 ] === "-end" ) ; if ( depth === 0 ) { return mout . object . merge ( section , { inner : content . slice ( start , position ) , after : content . slice ( position + length ) } ) ; } position += length ; } while ( true ) ; return null ; }
For inline-bake it searches for matching closing tags and returns inline content and other information
For inline - bake it searches for matching closing tags and returns inline content and other information
// tracks how difference between found opening and closing tags // character position in `content` where inner-content starts // current character position within _original_ content // length section (= spacing plus bake-tag) we currently evaluate // content left for further extraction