comparison MoinMoin/wikiutil.py @ 198:76c964712b0f

added support for linking to .ico and .bmp imported from: moin--main--1.5--patch-200
author Thomas Waldmann <tw@waldmann-edv.de>
date Sat, 05 Nov 2005 22:46:35 +0000
parents 722b8f648630
children 0a40d8a4057e
comparison
equal deleted inserted replaced
197:62fcbcbb8d92 198:76c964712b0f
977 @param url: the url in question 977 @param url: the url in question
978 @rtype: bool 978 @rtype: bool
979 @return: true if url points to a picture 979 @return: true if url points to a picture
980 """ 980 """
981 extpos = url.rfind(".") 981 extpos = url.rfind(".")
982 return extpos > 0 and url[extpos:].lower() in ['.gif', '.jpg', '.jpeg', '.png'] 982 return extpos > 0 and url[extpos:].lower() in ['.gif', '.jpg', '.jpeg', '.png', '.bmp', '.ico', ]
983 983
984 984
985 def link_tag(request, params, text=None, formatter=None, on=None, **kw): 985 def link_tag(request, params, text=None, formatter=None, on=None, **kw):
986 """ Create a link. 986 """ Create a link.
987 987