changeset 2791:65337f817b50 maint-0.7

better cross-link detection
author Richard Jones <richard@users.sourceforge.net>
date Tue, 19 Oct 2004 22:34:26 +0000
parents 638fc2dab5a1
children b602054c97d3
files CHANGES.txt roundup/cgi/templating.py
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES.txt	Fri Oct 15 01:10:22 2004 +0000
+++ b/CHANGES.txt	Tue Oct 19 22:34:26 2004 +0000
@@ -5,6 +5,7 @@
 Fixed:
 - popup listing uses filter args (thanks Marlon van den Berg)
 - fixed editing of message contents
+- loosened the detection of issue cross-references in messages
 
 
 2004-10-15 0.7.8
--- a/roundup/cgi/templating.py	Fri Oct 15 01:10:22 2004 +0000
+++ b/roundup/cgi/templating.py	Tue Oct 19 22:34:26 2004 +0000
@@ -1051,7 +1051,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')
@@ -1065,7 +1065,7 @@
             s2 = match.group('id')
             try:
                 # make sure s1 is a valid tracker classname
-                cl = self._db.getclass(s1)
+                cl = self._db.getclass(s1.lower())
                 if not cl.hasnode(s2):
                     raise KeyError, 'oops'
                 return '<a href="%s">%s%s</a>'%(s, s1, s2)

Roundup Issue Tracker: http://roundup-tracker.org/