anchor.diff:      if SysUtils.CharInSet(aText[I], [#9,#32,#124]) then
       begin
         LastWrappable := I;
  +      AfterWrapClMarkup := LastColorMarkup;
         PrevX := dx;
         LastWrappableIsSpace := True;
       end;
  
positive.code:   PrevX := 0;
    LastWrappable := -1;
    LastWrappableIsSpace := False;
  
    I := 1;
    while I <= Length(aText) do
  
negative.code:     //This algorithm is not perfect, somehow line width is not within SizeX, but very rare
      if ((dx > aMaxPxWidth) and (LastWrappable <> -1)) or (aText[I] = #124) then
      begin
        if LastWrappableIsSpace then
          aText[LastWrappable] := #124 //Replace last whitespace with EOL
        else begin
          Inc(LastWrappable);
          Insert(#124, aText, LastWrappable); //Insert EOL after last wrappable char
        end;
  
        if AfterWrapClMarkup <> '' then
        begin
          Insert('[]', aText, LastWrappable);
          Inc(I, 2);
          Inc(LastWrappable, 2);
        end;
  
        if (aText[I] <> #124) and aIndentAfterNL then
        begin
          Insert(INDENT, aText, LastWrappable+1);
          Inc(I, Length(INDENT));
          Inc(dx, Length(INDENT) * WordSpacing);
        end;
  
        if AfterWrapClMarkup <> '' then
        begin
          Insert(AfterWrapClMarkup, aText, LastWrappable+1);
          Inc(I, Length(AfterWrapClMarkup));
        end;
  
        Dec(dx, PrevX); //Subtract width since replaced whitespace
  
        LastWrappable := -1;
      end;
      //Force an EOL part way through a word
  