Skip to content

Commit

Permalink
Tempolary fix image rendering (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
tokusumi committed Nov 17, 2020
1 parent d3b4785 commit 5c82c0b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions markdown_embed_code/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ def render_fenced_code(self, element):
element.children[0].children = f"{code}\n"
return super().render_fenced_code(element)

def render_image(self, element):
template = "![{}]({}{})"
title = (
' "{}"'.format(element.title.replace('"', '\\"')) if element.title else ""
)
return template.format(self.render_children(element), element.dest, title)


def get_code_emb():
markdown = Markdown(renderer=MarkdownEmbEodeRenderer)
Expand Down

0 comments on commit 5c82c0b

Please sign in to comment.