Skip to content

Commit 64b4068

Browse files
author
Richard Jones
committed
better cross-link detection
1 parent 5ccc7f7 commit 64b4068

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ are given with the most recent entry first.
55
Fixed:
66
- popup listing uses filter args (thanks Marlon van den Berg)
77
- fixed editing of message contents
8+
- loosened the detection of issue cross-references in messages
89

910

1011
2004-10-15 0.7.8

roundup/cgi/templating.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,7 +1051,7 @@ def is_view_ok(self):
10511051
class StringHTMLProperty(HTMLProperty):
10521052
hyper_re = re.compile(r'((?P<url>\w{3,6}://\S+)|'
10531053
r'(?P<email>[-+=%/\w\.]+@[\w\.\-]+)|'
1054-
r'(?P<item>(?P<class>[a-z_]+)(?P<id>\d+)))')
1054+
r'(?P<item>(?P<class>[A-Za-z_]+)(\s*)?(?P<id>\d+)))')
10551055
def _hyper_repl(self, match):
10561056
if match.group('url'):
10571057
s = match.group('url')
@@ -1065,7 +1065,7 @@ def _hyper_repl(self, match):
10651065
s2 = match.group('id')
10661066
try:
10671067
# make sure s1 is a valid tracker classname
1068-
cl = self._db.getclass(s1)
1068+
cl = self._db.getclass(s1.lower())
10691069
if not cl.hasnode(s2):
10701070
raise KeyError, 'oops'
10711071
return '<a href="%s">%s%s</a>'%(s, s1, s2)

0 commit comments

Comments
 (0)