Author: cmpilato
Date: 2007-05-03 11:01:56-0700
New Revision: 1643
Modified:
trunk/lib/viewvc.py
Log:
* lib/viewvc.py
Fix some long lines. No functional changes.
Modified: trunk/lib/viewvc.py
Url:
http://viewvc.tigris.org/source/browse/viewvc/trunk/lib/viewvc.py?view=diff&rev=1643&p1=trunk/lib/viewvc.py&p2=trunk/lib/viewvc.py&r1=1642&r2=1643
==============================================================================
--- trunk/lib/viewvc.py (original)
+++ trunk/lib/viewvc.py 2007-05-03 11:01:56-0700
@@ -1011,14 +1011,19 @@
# Regular expressions for location text that looks like URLs and email
# addresses. Note that the regexps assume the text is already HTML-encoded.
-_re_rewrite_url =
re.compile('((http|https|ftp|file|svn|svn\+ssh)(://[-a-zA-Z0-9%.~:_/]+)((\?|\&)([-a-zA-Z0-9%.~:_]+)=([-a-zA-Z0-9%.~:_])+)*(#([-a-zA-Z0-9%.~:_]+)?)?)')
-_re_rewrite_email =
re.compile('([-a-zA-Z0-9_.\+]+)@(([-a-zA-Z0-9]+\.)+[A-Za-z]{2,4})')
+_re_rewrite_url = re.compile('((http|https|ftp|file|svn|svn\+ssh)'
+ '(://[-a-zA-Z0-9%.~:_/]+)((\?|\&)'
+ '([-a-zA-Z0-9%.~:_]+)=([-a-zA-Z0-9%.~:_])+)*'
+ '(#([-a-zA-Z0-9%.~:_]+)?)?)')
+_re_rewrite_email = re.compile('([-a-zA-Z0-9_.\+]+)@'
+ '(([-a-zA-Z0-9]+\.)+[A-Za-z]{2,4})')
def htmlify(html):
if not html:
return html
html = cgi.escape(html)
html = re.sub(_re_rewrite_url, r'<a href="\1">\1</a>', html)
- html = re.sub(_re_rewrite_email, r'<a
href="mailto:\1@\2">\1@\2</a>', html)
+ html = re.sub(_re_rewrite_email, r'<a href="mailto:\1@\2">\1@\2</a>',
+ html)
return html
def format_log(log, cfg):
|
Try Searching:
servers, voip, java, networking, microsoft ...
|
|
|
|