|
From: | Vincent Caron <address@hidden> |
Subject: | [cvsreport] detect and link URLs in HTML mode |
Date: | Wed, 30 Jul 2003 20:47:54 -0400 |
Commit from zerodeux | 2003-07-31 06:47 UTC |
detect and link URLs in HTML mode
Module | File name | Revision | |||
---|---|---|---|---|---|
cvsreport | ChangeLog | 1.23 | >>> | 1.24 | |
cvsreport | cvsreport | 1.24 | >>> | 1.25 |
cvsreport/ChangeLog 1.23 >>> 1.24 |
---|
Line 1 |
+ 2003/07/31 02:48 zerodeux + - html_coolfix: detect and link URLs in HTML mode + |
2003/07/31 02:24 zerodeux - full HTML diff support - updated example target |
cvsreport/cvsreport 1.24 >>> 1.25 |
---|
Line 873 |
return $_; } |
+ # Even better than html_fix, detects URLs and links them. + # + sub html_coolfix { + local $_ = html_fix shift; + + s/([a-z]+:\/\/[^ ]+)/<a href="">$1<\/a>/g; + return $_; + } + |
sub html_begin { my $conf = shift; |
Line 959 |
EOF |
- my $msg = html_fix $cset->{message}; |
+ my $msg = html_coolfix $cset->{message}; |
print <<EOF; <pre>$msg</pre> |
Line 1146 |
# Fix text for HTML output my $text = substr $_, 1; |
- $text = html_fix $text; |
+ $text = html_coolfix $text; |
$text =~ s/ / /g; # Only change style when necessary |
[Prev in Thread] | Current Thread | [Next in Thread] |