Ezio Melotti <ezio.melo...@gmail.com> added the comment:
Eventually I got home and checked, and it's failing here too.
The attached patch fixes the issue, ignoring a single trailing dot, comma,
colon, semicolon, or exclamation mark. Maybe the question mark could be added
too; closing parentheses are already ignored.
I tested the patch locally and it seems to work fine, however this should be
reported and fixed upstream. I'll create a new issue upstream once I prepare a
proper patch with tests.
----------
nosy: +ambv
_______________________________________________________
PSF Meta Tracker <metatrac...@psf.upfronthosting.co.za>
<http://psf.upfronthosting.co.za/roundup/meta/issue437>
_______________________________________________________
Index: roundup-src/roundup/cgi/templating.py
===================================================================
--- roundup-src/roundup/cgi/templating.py (revision 88927)
+++ roundup-src/roundup/cgi/templating.py (working copy)
@@ -1379,6 +1379,10 @@
pos = s.find('>')
end = s[pos:]
u = s = s[:pos]
+ if s.endswith(tuple('.,;:!')):
+ # don't include trailing punctuation
+ end = s[-1:] + end
+ u = s = s[:-1]
if ')' in s and s.count('(') != s.count(')'):
# don't include extraneous ')' in the link
pos = s.rfind(')')
_______________________________________________
Tracker-discuss mailing list
Tracker-discuss@python.org
http://mail.python.org/mailman/listinfo/tracker-discuss