Exemple #1
0
def test_render_html_with_extensions():
    text = u"Hello, https://pypa.io!"
    result = cmark.markdown_to_html_with_extensions(text,
                                                    extensions=['autolink'])
    expected = """
        <p>Hello, <a href="https://pypa.io">https://pypa.io</a>!</p>
    """
    assert _normalize_ws(result) == _normalize_ws(expected)
Exemple #2
0
def test_render_html_with_extensions():
    text = u"Hello, https://pypa.io!"
    result = cmark.markdown_to_html_with_extensions(text,
                                                    extensions=['autolink'])
    assert result == textwrap.dedent("""\
        <p>Hello, <a href="https://pypa.io">https://pypa.io</a>!</p>\n""")