[Zope3-checkins] CVS: Products3/z3checkins - message.py:1.27
Gintautas Miliauskas
gintas at pov.lt
Tue Feb 10 14:28:23 EST 2004
Update of /cvs-repository/Products3/z3checkins
In directory cvs.zope.org:/tmp/cvs-serv8936
Modified Files:
message.py
Log Message:
Now hyperlinks are created for URL's in the message body.
=== Products3/z3checkins/message.py 1.26 => 1.27 ===
--- Products3/z3checkins/message.py:1.26 Tue Feb 10 12:51:14 2004
+++ Products3/z3checkins/message.py Tue Feb 10 14:27:52 2004
@@ -595,6 +595,11 @@
.replace('<', '<') \
.replace('>', '>') \
.replace('"', '"')
+
+ text = re.sub(r'(https?://.+?)'
+ r'($|[ \t\r\n)]|>|"|[.,](?:$|[ \t\r\n]))',
+ r'<a href="\1">\1</a>\2', text)
+
log_idx = text.find('\nLog message:\n')
if log_idx == -1:
log_idx = text.find('\nLog Message:\n')
More information about the Zope3-Checkins
mailing list