function generateCodeArray( str ) {
	var prompts;
	var output;
	var code;
	var arr;
	var out;
	var i;

	out = [];
	prompts = str.split( RE_PROMPT );
	for ( i = 1; i < prompts.length; i++ ) {
		arr = prompts[ i ].split( RE_CODE_OUTPUT_SEP );

		// Remove initial prompt:
		code = replace( arr[ 0 ], /^ {4}>/, '' );

		// Remove `...` in code blocks spanning multiple lines:
		code = replace( code, '\n    ...', '\n' );

		// Remove indentation:
		code = replace( code, '\n    ', '\n' );
		output = arr[ 1 ];
		if ( output ) {
			output = replace( output, /\/\/[^\n]*\n/g, '' );
			output = replace( output, /\/\/[^\n]*\n/g, '' );
		} else {
			output = '';
		}
		out.push({
			'code': trim( code ),
			'rawCode': arr[ 0 ],
			'output': trim( output )
		});
	}
	return out;
}
Extracts code chunks of `Examples` section.

@private
@param {*} str - contents of `Examples` section
@returns {Array} array of code objects