Mercurial > p > roundup > code
diff roundup/cgi/templating.py @ 2668:f48a81d49a86
relaxed hyperlinking in web interface (accept "issue123" or "Issue 123")
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 03 Sep 2004 02:24:14 +0000 |
| parents | 8348373b4361 |
| children | 63f8b13ba85f |
line wrap: on
line diff
--- a/roundup/cgi/templating.py Mon Aug 30 06:27:50 2004 +0000 +++ b/roundup/cgi/templating.py Fri Sep 03 02:24:14 2004 +0000 @@ -1088,7 +1088,7 @@ class StringHTMLProperty(HTMLProperty): hyper_re = re.compile(r'((?P<url>\w{3,6}://\S+)|' r'(?P<email>[-+=%/\w\.]+@[\w\.\-]+)|' - r'(?P<item>(?P<class>[a-z_]+)(?P<id>\d+)))') + r'(?P<item>(?P<class>[A-Za-z_]+)(\s*)?(?P<id>\d+)))') def _hyper_repl(self, match): if match.group('url'): s = match.group('url') @@ -1098,7 +1098,7 @@ return '<a href="mailto:%s">%s</a>'%(s, s) else: s = match.group('item') - s1 = match.group('class') + s1 = match.group('class').lower() s2 = match.group('id') try: # make sure s1 is a valid tracker classname
