function convert( markdown ) {
	var mTransform;
	var base;
	var clbk;
	if (
		!isString( markdown ) &&
		!isBuffer( markdown )
	) {
		throw new TypeError( format( 'invalid argument. First argument must be either a string or Buffer. Value: `%s`.', markdown ) );
	}
	if ( arguments.length === 2 ) {
		base = '/docs/api/develop/';
		clbk = arguments[ 1 ];
		if ( !isFunction( clbk ) ) {
			throw new TypeError( format( 'invalid argument. Last argument must be a function. Value: `%s`.', clbk ) );
		}
	}
	else {
		base = arguments[ 1 ];
		clbk = arguments[ 2 ];
		if ( !isString( base ) ) {
			throw new TypeError( format( 'invalid argument. Version argument must be a string. Value: `%s`.', base ) );
		}
		if ( !isFunction( clbk ) ) {
			throw new TypeError( format( 'invalid argument. Last argument must be a function. Value: `%s`.', clbk ) );
		}
	}
	mTransform = remark()
		.use( headings )
		.use( linkify, {
			'base': base
		})
		.use( equations )
		.use( toHTML )
		.process;

	// Convert the Markdown to HTML:
	mTransform( markdown.toString(), onMarkdownTransform );

	/**
	* Callback invoked after transforming Markdown to HTML.
	*
	* @private
	* @param {(Error|null)} error - error object
	* @param {File} [vfile] - virtual file
	* @returns {void}
	*/
	function onMarkdownTransform( error, vfile ) {
		if ( error ) {
			return done( error );
		}
		// Syntax highlight the HTML code elements:
		hTransform( vfile, onHTMLTransform );
	}

	/**
	* Callback invoked after transforming HTML.
	*
	* @private
	* @param {(Error|null)} error - error object
	* @param {File} [vfile] - virtual file
	* @returns {void}
	*/
	function onHTMLTransform( error, vfile ) {
		if ( error ) {
			return done( error );
		}
		done( null, postProcess( vfile.toString() ) );
	}

	/**
	* Callback invoked upon completion.
	*
	* @private
	* @param {(Error|null)} error - error object
	* @param {string} [html] - HTML
	* @returns {void}
	*/
	function done( error, html ) {
		if ( error ) {
			return clbk( error );
		}
		clbk( null, html );
	}
}
Converts Markdown to HTML.

@param {(string|Buffer)} markdown - markdown to convert
@param {string} [base='/docs/api/develop/'] - base path for internal URLs
@param {Function} clbk - callback to invoke on completion
@throws {TypeError} first argument must be either a string or Buffer
@throws {TypeError} last argument must be a function

@example
var markdown = '# Beep\n> Boop!';

convert( markdown, done );

function done( error, html ) {
    if ( error ) {
        throw error;
    }
    console.log( html );
}