diff options
author | rsiddharth <s@ricketyspace.net> | 2017-02-22 03:47:42 +0000 |
---|---|---|
committer | rsiddharth <s@ricketyspace.net> | 2017-02-22 03:47:42 +0000 |
commit | 4e645f0a298fa061899eafd10722534beb305189 (patch) | |
tree | abc0a4a85706813a9c533ba5ed13c073dafbb957 /mdl_style.py | |
parent | 08f44ce7e60f61a2a87a71ee033b045b8d995125 (diff) |
mdl_stlye: Update `LSRenderer` class.
* TODO: Update file.
* markdown_link_style/_version.py (__version__): Update variable.
* mdl_style.py (LSRenderer.image): Add method.
* tests/data/inline_parses_images_00-expected.md: Add file.
* tests/data/inline_parses_images_00.md: Add file.
* tests/test_mdl_style.py
(TestLSRendererIL.test_renderer_parses_images): Add test method.
Diffstat (limited to 'mdl_style.py')
-rw-r--r-- | mdl_style.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mdl_style.py b/mdl_style.py index 3f9d716..8ed6e92 100644 --- a/mdl_style.py +++ b/mdl_style.py @@ -129,6 +129,11 @@ class LSRenderer(Renderer): link_text = self._stylize_link(link, title, text) return link_text + def image(self, src, title, text): + # Markup for images are same as links, except it is prefixed + # with a bang (!). + return '{}{}'.format('!', self.link(src, title, text)) + def _stylize_link(self, link, title, text): if self.link_style == 'inline': return self._gen_inline_link(link, title, text) |