How to use the cmarkgfm.cmark.github_flavored_markdown_to_html function in cmarkgfm

To help you get started, we’ve selected a few cmarkgfm examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github theacodes / cmarkgfm / tests / test_cmark.py View on Github external
def test_github_flavored_markdown_to_html():
    text = u"Hello, https://pypa.io!"
    result = cmark.github_flavored_markdown_to_html(text)
    assert result == textwrap.dedent("""\
        <p>Hello, <a href="https://pypa.io">https://pypa.io</a>!</p>\n""")
github theacodes / cmarkgfm / tests / test_cmark.py View on Github external
def test_github_flavored_markdown_to_html_pre_tag():
    text = u"```python\nprint('hello')\n```"
    result = cmark.github_flavored_markdown_to_html(text)
    assert result == textwrap.dedent("""\
        <pre><code class="language-python">print('hello')</code></pre>