anchor.diff:          'details': details,
         });
       }
  -    if (previousIndex < content.length) {
  +    if (previousOffset < content.length) {
         // Last region of unmodified content.
         regions.add({
           'modified': false,
  -        'content': content.substring(previousIndex),
  +        'content': content.substring(previousOffset),
         });
       }
       return regions;
  
positive.code:     List<NavigationTarget> targets = unitInfo.targets.toList();
      targets.sort((first, second) => first.offset.compareTo(second.offset));
      List<Map> targetRegions = [];
      int previousIndex = 0;
      for (NavigationTarget target in targets) {
        int offset = mapper.map(target.offset);
        int length = target.length;
        if (offset > previousIndex) {
          // Display a non-target region.
          targetRegions.add({
            'content': content.substring(previousIndex, offset),
            'isTarget': false,
          });
          // Add a target region.
  
negative.code:           'isTarget': true,
            'target': 'o${target.offset}',
          });
          previousOffset = offset + length;
        }
      }
      if (previousOffset < content.length) {
        // Last non-target region.
        targetRegions.add({
          'content': content.substring(previousOffset),
          'isTarget': false,
        });
      }
  