diff options
Diffstat (limited to 'src/md.py')
-rwxr-xr-x | src/md.py | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -29,6 +29,7 @@ class TocMixin(): self.toc_tree = [] self.toc_count = 0 self.title = None + self.img_count = -1 def header(self, text, level, raw=None): rv = "" @@ -42,6 +43,13 @@ class TocMixin(): self.toc_count += 1 return rv + #Lets do previev image + def image(self, src, title, alt_text): + prev_img = src.split(".") + prev_img = prev_img[0]+"_prev."+prev_img[1] + self.img_count += 1 + return "<a href="+src+"><img src=\""+prev_img+"\" alt=\""+alt_text+"\"></a>" + def render_toc(self, level=3): """Render TOC to HTML. |