=================================================================== RCS file: /cvs/todotxt/Text-Todo/lib/Text/Todo/Entry.pm,v retrieving revision 1.4 retrieving revision 1.6 diff -u -r1.4 -r1.6 --- todotxt/Text-Todo/lib/Text/Todo/Entry.pm 2009/07/11 16:58:50 1.4 +++ todotxt/Text-Todo/lib/Text/Todo/Entry.pm 2009/07/13 18:50:37 1.6 @@ -1,6 +1,6 @@ package Text::Todo::Entry; -# $RedRiver: Entry.pm,v 1.3 2009/07/10 22:52:08 andrew Exp $ +# $RedRiver: Entry.pm,v 1.5 2009/07/11 16:02:18 andrew Exp $ use warnings; use strict; @@ -59,8 +59,8 @@ foreach my $tag ( keys %tags ) { my $symbol = quotemeta $tags{$tag}; - $tags_of{$ident}{$tag} - = { map { $_ => q{} } $text =~ / $symbol (\S+)/gxms }; + $tags_of{$ident}{$tag} = { map { $_ => q{} } + $text =~ / (?:^|\s) $symbol (\S+)/gxms }; } ( $priority_of{$ident} ) = $text =~ /^ \s* \( ([A-Z]) \)/ixms; @@ -76,10 +76,8 @@ } sub _is_in { - my ( $self, $type, $item ) = @_; - my $ident = ident($self); - - return defined first { $_ eq $item } $self->$type; + my ( $self, $tags, $item ) = @_; + return defined first { $_ eq $item } $self->$tags; } sub text {