function render( files, base, clbk ) {
	var total;
	var i;

	total = files.length;
	i = -1;

	return next();

	/**
	* Renders the next file.
	*
	* @private
	*/
	function next() {
		var str;

		i += 1;

		debug( 'Rendering file %d of %d: %s', i+1, total, files[ i ].file );
		str = removeHeader( files[ i ].data, RE_HEADER );
		toHTML( str, base, onRender );

		/**
		* Callback invoked after rendering a file.
		*
		* @private
		* @param {(Error|null)} error - error object
		* @param {string} html - rendered HTML
		* @returns {void}
		*/
		function onRender( error, html ) {
			if ( error ) {
				debug( 'Encountered an error when rendering file. File: %s (%d of %d). Error: %s', files[ i ].file, i+1, total, error.message );
				return clbk( error );
			}
			debug( 'Rendered file.' );
			files[ i ].data = html;

			nextTick( done );
		}
	}

	/**
	* Callback invoked upon rendering all files.
	*
	* @private
	* @returns {void}
	*/
	function done() {
		var j = i + 1;
		if ( j < total ) {
			debug( 'Rendered %d of %d files.', j, total );
			return next();
		}
		debug( 'Successfully rendered all files.' );
		return clbk( null, files );
	}
}
Renders a list of Markdown files to HTML.

## Notes

-   This function mutates the input file list.

@private
@param {ObjectArray} files - Markdown files
@param {string} base - base path for internal URLs
@param {Callback} clbk - callback to invoke upon completion
@returns {void}