changeset 1739:aef7aa0effc3

text_gedit formatter, ImageLink: minor optimizations
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 13 Jan 2007 23:36:43 +0100
parents 7ac15b5e2db8
children 2f37f1914570
files MoinMoin/formatter/text_gedit.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/formatter/text_gedit.py	Sat Jan 13 23:32:55 2007 +0100
+++ b/MoinMoin/formatter/text_gedit.py	Sat Jan 13 23:36:43 2007 +0100
@@ -77,8 +77,7 @@
         kw['title'] = "attachment:%s" % wikiutil.quoteWikinameURL(url)
         if '/' in url:
             pagename, target = AttachFile.absoluteName(url, pagename)
-            url = url.split('/')
-            url = url[len(url)-1]
+            url = url.split('/')[-1]
         kw['src'] = AttachFile.getAttachUrl(pagename, url, self.request, addts=1)
         return self.image(**kw)