anchor.diff:    end;
   
   ProfileEvent(S);
  -  Text := PChar(S);
  +  AText := S;
   end;
   
   function TTopic.SearchForWord( DictIndex: integer;
  
positive.code: // Main translation function. Turns the IPF data into
  // a text string. Translates formatting codes into tags
  // as for Rich Text Viewer.
  // Uses TAString for speed without length limits
  // - string is too short
  // - PChar is slow to concatenate (unless you keep track of the insert point)
  // - AnsiString is slow
  procedure TTopic.GetText( HighLightWords: Int32ArrayPointer;
                            ShowCodes: boolean;
                            Var Text: PChar;
                            ImageOffsets: TList );
  var
    SlotIndex: integer;
    Slot: THelpTopicSlot;
    pData: pInt8;
    pSlotEnd: pInt8;
  
    S: string;
    Word: string;
  
    GlobalDictIndex: int32;
  
    Spacing: boolean;
    InFixedFont: boolean;
  
    WordsOnLine: longint;
  
    StringToAdd: string;
    LocalDictIndex: int8;
    DebugString: string;
    EscapeDebugString: string;
  
    LinkIndex: longint;
  begin
    if Links = nil then
      Links:= TList.Create;
  
    S := '';
  {  Text:= StrNew( S.AsPChar );
    S.Destroy;
    exit;}
  
    ImageOffsets.Clear;
  
    LinkIndex:= 0;
  
    InFixedFont:= false;  // ? Not sure... this could be reset at start of slot
  
    WordsOnLine:= 0;
  
    for SlotIndex := 0 to _NumSlots - 1 do
    begin
  ProfileEvent('Processing SlotIndex ' + IntToStr(SlotIndex));
      Spacing:= true;
      Slot := THelpTopicSlot(_Slots[ SlotIndex ]);
  
      pData := Slot.pData;
  
      pSlotEnd := pData + Slot.Size;
  
      while pData < pSlotEnd do
      begin
        LocalDictIndex := pData^;
  
        StringToAdd := '';
  
        if LocalDictIndex < Slot.LocalDictSize then
  
negative.code:           Word := '';
  
          Word:= SubstituteAngleBrackets( Word );
          { TODO -ograemeg : Temp change disabling highlight words }
          //if HighlightWords^[ GlobalDictIndex ] > 0 then
          //  StringToAdd := '<red>' + Word + '<black>'
          //else
            StringToAdd := Word;
  
          if Spacing then
  