<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_html(text, config, search_path):
 """ Convert Markdown text to HTML """

    processor = misaka.Markdown(HtmlRenderer(config, search_path),
                                extensions=ENABLED_EXTENSIONS)

    text = processor(text)
    if not config.get('no_smartquotes'):
        text = misaka.smartypants(text)

    return flask.Markup(text)