From 5419db76083003bff7eb1cc76eedab33b542d165 Mon Sep 17 00:00:00 2001 From: komar Date: Thu, 1 May 2014 16:57:59 +0200 Subject: [PATCH] copy from 'matcher'. allow comments and spaces in patterns --- url-select | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/url-select b/url-select index f4ddda8..bb1e047 100644 --- a/url-select +++ b/url-select @@ -65,8 +65,10 @@ sub on_start { } elsif ($self->x_resource('matcher.pattern.1')) { my $current = 1; - while ($self->x_resource("matcher.pattern.$current")) { - push @{$self->{pattern}}, $self->x_resource("matcher.pattern.$current"); + while (defined (my $res = $self->x_resource("matcher.pattern.$current"))) { + $res = $self->locale_decode($res); + utf8::encode $res; + push @{$self->{pattern}}, qr($res)x; $current++; } } else {