Пример #1
0
    def test_markdown_renderer(self):
        with open("tests/samples/syntax.md", encoding="utf-8") as f:
            text = f.read()

        markdown = marko.Markdown(renderer=MarkdownRenderer)
        rerendered = markdown(text)
        assert normalize_html(marko.convert(rerendered)) == normalize_html(
            marko.convert(text))
Пример #2
0
    def test_markdown_renderer(self):
        from marko.md_renderer import MarkdownRenderer

        with open('tests/samples/syntax.md') as f:
            text = f.read()

        markdown = marko.Markdown(renderer=MarkdownRenderer)
        rerendered = markdown(text)
        assert (normalize_html(marko.convert(rerendered)) == normalize_html(
            marko.convert(text)))
Пример #3
0
 def assert_case(self, text, html):
     result = self.markdown(text)
     assert normalize_html(result) == normalize_html(html)