Bug #703 - /foo/bar/g doesn't operate globally on annotations

- Fixed bug #703 that was failing to reset a moving pattern cursor between
  annotations.
- Added unit tests to  verify this functionality.
This commit is contained in:
Paul Beckingham 2011-03-26 09:50:26 -04:00
parent 437bb95f01
commit a1d47e9509
3 changed files with 83 additions and 1 deletions

View file

@ -205,10 +205,10 @@ void Subst::apply (
// Perform all subs on annotations.
counter = 0;
pattern = 0;
std::vector <Att>::iterator i;
for (i = annotations.begin (); i != annotations.end (); ++i)
{
pattern = 0;
std::string annotation = i->value ();
while ((pattern = find (annotation, mFrom, pattern, sensitive)) != std::string::npos)
{