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)
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)