From 544b52b35765112ce13df58d407baebe817f3ed3 Mon Sep 17 00:00:00 2001 From: Sterling Camden Date: Sat, 11 Sep 2010 11:35:22 -0700 Subject: More formatting for 80 columns. --- url-picker | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/url-picker b/url-picker index 3f7eabe..a9459b5 100644 --- a/url-picker +++ b/url-picker @@ -6,9 +6,11 @@ my $url = qr{ (?:https?://|ftp://|news://|mailto:|file://|\bwww\.) [a-zA-Z0-9\-\@;\/?:&=%\$_.+!*\x27,~#]* - ( - \([a-zA-Z0-9\-\@;\/?:&=%\$_.+!*\x27,~#]*\)| # Allow a pair of matched parentheses - [a-zA-Z0-9\-\@;\/?:&=%\$_+*~] # exclude some trailing characters (heuristic) + ( + # Allow a pair of matched parentheses + \([a-zA-Z0-9\-\@;\/?:&=%\$_.+!*\x27,~#]*\)| + # exclude some trailing characters (heuristic) + [a-zA-Z0-9\-\@;\/?:&=%\$_+*~] )+ }x; @@ -109,7 +111,8 @@ sub update { my @matches; while (++$ndx <= $size) { my $overlay = $labels->{$ndx}; - if (($len == 0) || (($len <= length($ndx)) && (substr($ndx,0,$len) eq $p->{buffer}))) { + if (($len == 0) || + (($len <= length($ndx)) && (substr($ndx,0,$len) eq $p->{buffer}))) { $overlay->show; unshift @matches,$hrefs->{$ndx}; } else { -- cgit v1.2.3