File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ sub revision_links {
121
121
);
122
122
my $url_prefix = $prefixes {$channel };
123
123
return $r unless $url_prefix ;
124
- $r =~ s / ^r// ;
124
+ $r =~ s / ^r\x{02} ? // ;
125
125
return qq{ <a href="$url_prefix$r " title="Changeset for r$r ">r$r </a>} ;
126
126
}
127
127
@@ -258,7 +258,10 @@ my %output_chain = (
258
258
rest => ' revision_links' ,
259
259
},
260
260
revision_links => {
261
- re => qr /\b r[1-9]\d *\b / ,
261
+ # regex cludge: on #bioclipse the revision numbers by some
262
+ # weird bot contain non-printable characters for formating
263
+ # purposes
264
+ re => qr /\b r\x{02} ?[1-9]\d *\b / ,
262
265
match => \&revision_links,
263
266
rest => ' email_obfuscate' ,
264
267
},
Original file line number Diff line number Diff line change 1
1
use strict;
2
2
use warnings;
3
- use Test::More tests => 5 ;
3
+ use Test::More tests => 6 ;
4
4
5
5
BEGIN { use_ok(' IrcLog::WWW' ); }
6
6
@@ -49,6 +49,11 @@ my @tests = (
49
49
result => undef ,
50
50
desc => ' r0\d+ does not linkify' ,
51
51
},
52
+ {
53
+ test => ' r' . chr (2) . ' 123' ,
54
+ result => ' r123' ,
55
+ desc => ' revision links with chr(02) after the r still work' ,
56
+ }
52
57
);
53
58
54
59
for my $h (@tests ){
You can’t perform that action at this time.
0 commit comments