anchor.diff:  end;
   
   type
  -
     { TEditorHtmlTagRecord }
   
  +  PEditorHtmlTagRecord = ^TEditorHtmlTagRecord;
     TEditorHtmlTagRecord = record
       bClosing: boolean;
       sTagName: string[30];
       class operator =(const a, b: TEditorHtmlTagRecord): boolean;
     end;
   
  -  TEditorHtmlTagList = specialize TFPGList<TEditorHtmlTagRecord>;
  +  { TEditorHtmlTagList }
  +
  +  TEditorHtmlTagList = class(specialize TFPGList<TEditorHtmlTagRecord>)
  +  public
  +    function ItemPtr(AIndex: integer): PEditorHtmlTagRecord;
  +  end;
   
   procedure EditorFindHtmlTagsInText(const AText: UnicodeString;
     AList: TEditorHtmlTagList; AllowSingletonTags: boolean);
  
positive.code:   Ed.DoEventChange(AY);
  end;
  
  { TEditorHtmlTagRecord }
  
  class operator TEditorHtmlTagRecord.=(const a, b: TEditorHtmlTagRecord): boolean;
  
negative.code:     //delete pairs <tag> - </tag>
      for i:= tags.Count-1 downto 0 do
      begin
        tagPtr:= tags.ItemPtr(i);
        if not tagPtr^.bClosing then
          for j:= i+1 to tags.Count-1 do
          begin
            tagPtr2:= tags.ItemPtr(j);
            if tagPtr2^.bClosing and SameText(tagPtr^.sTagName, tagPtr2^.sTagName) then
            begin
              tags.Delete(j);
              tags.Delete(i);
              Break;
            end;
          end;
      end;
  
      //take last opened tag
      for i:= tags.Count-1 downto 0 do
      begin
        tagPtr:= tags.ItemPtr(i);
        if not tagPtr^.bClosing then
        begin
          Result:= tagPtr^.sTagName;
          Break
        end;
      end;
    finally
      FreeAndNil(tags);
    end;
  