anchor.diff:  implementation
   
   const
  -  cHeaderChars: UnicodeString = '-=\''"`:^~_*+#<>';
  +  cHeaderChars = '-=\''"`:^~_*+#<>';
   
   class function TTreeHelperRest.IsHeaderOfChar(const S: UnicodeString; ch: WideChar): boolean;
   var
  
positive.code:   private
      class function IsHeaderOfChar(const S: UnicodeString; ch: WideChar): boolean;
      class function IsHeaderLine(const S: UnicodeString): boolean;
      class function GetLevel(NewChar, PrevChar: WideChar): integer;
    public
      class procedure GetHeaders(Ed: TATSynEdit; Data: TATTreeHelperRecords);
    end;
  
negative.code:   Result:= false;
  end;
  
  class procedure TTreeHelperRest.GetHeaders(Ed: TATSynEdit; Data: TATTreeHelperRecords);
  var
    DataItem: TATTreeHelperRecord;
    St: TATStrings;
    S: UnicodeString;
    NLen, NLevel, iLine, iLevel: integer;
    HeaderChar: WideChar;
    HeaderLevels: array[1..Length(cHeaderChars)+1] of WideChar;
  begin
    Data.Clear;
    St:= Ed.Strings;
    FillChar(HeaderLevels, SizeOf(HeaderLevels), 0);
    for iLine:= 1{not 0} to St.Count-1 do
    begin
      S:= St.Lines[iLine];
      if S='' then Continue;
      if IsHeaderLine(S) then
      begin
        NLen:= St.LinesLen[iLine-1];
        if (NLen>0) and (NLen<=Length(S)) then
        begin
          HeaderChar:= S[1];
  
          //calculate level of char, dynamically for each new document
          NLevel:= 1;
          for iLevel:= Low(HeaderLevels) to High(HeaderLevels) do
          begin
            if HeaderLevels[iLevel]=#0 then
            begin
              NLevel:= iLevel;
              HeaderLevels[iLevel]:= HeaderChar;
              Break;
            end;
            if HeaderLevels[iLevel]=HeaderChar then
            begin
              NLevel:= iLevel;
              Break;
            end;
          end;
  
          DataItem.X1:= 0;
          DataItem.Y1:= iLine-1;
          DataItem.X2:= 0;
          DataItem.Y2:= iLine;
          DataItem.Level:= NLevel;
          DataItem.Title:= St.Lines[iLine-1];
          DataItem.Icon:= -1;
          Data.Add(DataItem)
  