Ejemplo n.º 1
0
    def test_markdown_code(self):
        s = '```\nprint()\n```'
        assert 'highlight' not in renderer.render_markdown(s, code=True)

        s = '```python\nprint()\n```'
        assert 'highlight' in renderer.render_markdown(s, code=True)
Ejemplo n.º 2
0
    def test_markdown_image(self):
        img = 'hello ![alt](http://path.to/img)'
        assert '<figure>' not in renderer.render_markdown(img, code=False)

        img = 'hello ![alt](http://path.to/img "has title")'
        assert '<figure>' in renderer.render_markdown(img, code=False)