Subject: | Search::Tools::HiLiter doesn't match terms inside hyphenated phrases |
I'd like to have Search::Tools::HiLiter highlight instances of a word
that's inside a hyphenated phrase. As it stands right now, it fails to
catch words in hyphenated phrases. I'm willing to to enable this
matching via a special flag, if needed.
Here's an example:
use Search::Tools::HiLiter;
use Test::More tests => 2;
my $hiliter = Search::Tools::HiLiter->new( query => [qw( Kennedy )] );
like( $hiliter->light(q{Martha Kennedy Smith}),
qr/<span/, 'hiliter works fine without hyphens' );
like( $hiliter->light(q{Martha Kennedy-Smith}),
qr/<span/, 'hiliter ought to work with hyphens' );
Search::Tools works *really* well otherwise, and it's very intuitively
designed and documented. Thanks so much for your work.