ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/perl/matcher
(Generate patch)

Comparing rxvt-unicode/src/perl/matcher (file contents):
Revision 1.10 by root, Sun Jun 10 17:31:53 2012 UTC vs.
Revision 1.13 by root, Tue Sep 4 22:41:11 2012 UTC

9#:META:X_RESOURCE:%.launcher.:string:custom launcher for pattern 9#:META:X_RESOURCE:%.launcher.:string:custom launcher for pattern
10#:META:X_RESOURCE:%.rend.:string:custom rednition for pattern 10#:META:X_RESOURCE:%.rend.:string:custom rednition for pattern
11 11
12=head1 NAME 12=head1 NAME
13 13
14 matcher - match strings in terminal output and change their rendition 14matcher - match strings in terminal output and change their rendition
15 15
16=head1 DESCRPTION 16=head1 DESCRIPTION
17 17
18Uses per-line display filtering (C<on_line_update>) to underline text 18Uses per-line display filtering (C<on_line_update>) to underline text
19matching a certain pattern and make it clickable. When clicked with the 19matching a certain pattern and make it clickable. When clicked with the
20mouse button specified in the C<matcher.button> resource (default 2, or 20mouse button specified in the C<matcher.button> resource (default 2, or
21middle), the program specified in the C<matcher.launcher> resource 21middle), the program specified in the C<matcher.launcher> resource
47=cut 47=cut
48 48
49my $url = 49my $url =
50 qr{ 50 qr{
51 (?:https?://|ftp://|news://|mailto:|file://|\bwww\.) 51 (?:https?://|ftp://|news://|mailto:|file://|\bwww\.)
52 [a-zA-Z0-9\-\@;\/?:&=%\$_.+!*\x27,~#]* 52 [\w\-\@;\/?:&=%\$.+!*\x27,~#]*
53 ( 53 (
54 \([a-zA-Z0-9\-\@;\/?:&=%\$_.+!*\x27,~#]*\)| # Allow a pair of matched parentheses 54 \([\w\-\@;\/?:&=%\$.+!*\x27,~#]*\)| # Allow a pair of matched parentheses
55 [a-zA-Z0-9\-\@;\/?:&=%\$_+*~] # exclude some trailing characters (heuristic) 55 [\w\-\@;\/?:&=%\$+*~] # exclude some trailing characters (heuristic)
56 )+ 56 )+
57 }x; 57 }x;
58 58
59sub on_key_press { 59sub on_key_press {
60 my ($self, $event, $keysym, $octets) = @_; 60 my ($self, $event, $keysym, $octets) = @_;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines