Commits

Oben Sonne committed 19fcc2f

Images link to themselves (except parameter 'nolink' is set)

Comments (0)

Files changed (1)

         el.set("style", style)
         for key, value in [p.split("=", 1) for p in params if "=" in p]:
             el.set(key, value.strip("'\""))
+
+        if "nolink" not in params:
+            atag = markdown.etree.Element('a')
+            atag.set("href", "/media/images/%s" % fname)
+            atag.append(el)
+            el = atag
+
         return el
 
 class DiggieExtension(markdown.Extension):