# Path: yapper/utilities/md.py
# def create_post_from_md(body):
#     """Parse markdown and linkify urls."""
#     # allowed_tags = ['a', 'abbr', 'acronym', 'b', 'blockquote', 'code',
#     #                 'em', 'li', 'i', 'ol', 'pre', 'strong', 'ul', 'h1',
#     #                 'h2', 'h3', 'p', 'span']
#     no_link_text = markdown(
#         body,
#         output_format='html5',
#         extensions=[
#             'codehilite(linenums=True)',
#             PyEmbedMarkdown(),
#             LazyYoutubeExtension()
#         ]
#     )
#     return bleach.linkify(
#         no_link_text,
#         callbacks=[externallify_url, dont_linkify_urls],
#         skip_pre=True
#     )


import unittest
from yapper.utilities.md import create_post_from_md


class TestTextConversion(unittest.TestCase):

    def test_md_conversion(self):
        post = """# Hello
What is this?

*hah* [Another](http://another.com)

**intexturl** http://google.com

    from os import path

# Path: yapper/utilities/md.py
# def create_post_from_md(body):
#     """Parse markdown and linkify urls."""
#     # allowed_tags = ['a', 'abbr', 'acronym', 'b', 'blockquote', 'code',
#     #                 'em', 'li', 'i', 'ol', 'pre', 'strong', 'ul', 'h1',
#     #                 'h2', 'h3', 'p', 'span']
#     no_link_text = markdown(
#         body,
#         output_format='html5',
#         extensions=[
#             'codehilite(linenums=True)',
#             PyEmbedMarkdown(),
#             LazyYoutubeExtension()
#         ]
#     )
#     return bleach.linkify(
#         no_link_text,
#         callbacks=[externallify_url, dont_linkify_urls],
#         skip_pre=True
#     )


# Path: tests/PostTest/test_markdown.py
import unittest
from yapper.utilities.md import create_post_from_md



class TestTextConversion(unittest.TestCase):

    def test_md_conversion(self):
        post = """# Hello
What is this?

*hah* [Another](http://another.com)

**intexturl** http://google.com

    from os import path

    print(os.abspath(__name__))