def markdown(value, extensions=MARKDOWN_EXTENSIONS):
    """
    Markdown processing with optionally using various extensions
    that python-markdown supports.
    `extensions` is an iterable of either markdown.Extension instances
    or extension paths.
    """
    try:
        import markdown
    except __HOLE__:
        warnings.warn("The Python markdown library isn't installed.",
                      RuntimeWarning)
        return value

    return markdown.markdown(force_text(value), extensions=extensions)
dataset/ETHPy150Open Fantomas42/django-blog-zinnia/zinnia/markups.py/markdown