Adjusted denotate

- partly matched strings are now also detected in the middle of the
  annotation and not only from the beginning.
This commit is contained in:
Federico Hernandez 2010-06-21 22:56:05 +02:00
parent cd648270ab
commit b6d320d311
2 changed files with 2 additions and 3 deletions

View file

@ -37,8 +37,7 @@ Adds an annotation to an existing task.
.B denotate ID description .B denotate ID description
Deletes an annotation for the specified task. If the provided description matches an Deletes an annotation for the specified task. If the provided description matches an
annotation exactly, the corresponding annotation is deleted. If the provided description annotation exactly, the corresponding annotation is deleted. If the provided description
matches an annotation partly (from the beginning), the first partly matched annotation matches annotations partly, the first partly matched annotation is deleted.
is deleted.
.TP .TP
.B info ID .B info ID

View file

@ -2082,7 +2082,7 @@ int handleDenotate (std::string &outs)
anno = i->value (); anno = i->value ();
std::string::size_type loc = find (anno, desc, sensitive); std::string::size_type loc = find (anno, desc, sensitive);
if (loc != std::string::npos && loc == 0) if (loc != std::string::npos)
{ {
match = true; match = true;
annotations.erase (i); annotations.erase (i);