anchor.diff:        end;
       end;
       delete( LocationStr, 1, p );
  +
  +    if assigned(Note) then
  +      if ( Note.Kind = ntTree ) then
  +      begin
  +        if ( Location.NodeID <> 0 ) then
  +          myTreeNode := TTreeNote( Note ).GetTreeNodeByID( Location.NodeID )
  +        else
  +          myTreeNode := TTreeNote( Note ).TV.Items.FindNode( [ffText], Location.NodeName, nil );
  +
  +        if assigned(myTreeNode) then
  +            if assigned( myTreeNode.Data ) then begin
  +               Location.NodeID:= TNoteNode( myTreeNode.Data ).ID;
  +               Location.NoteName:= TNoteNode( myTreeNode.Data ).Name;
  +            end;
  +      end;
  +
   
       if ( LocationStr <> '' ) then
       begin
  
positive.code:   Location : TLocation;
    NewFormatURL : boolean;
    origLocationStr : string;
  begin
  
    // Handles links that point to a "KNT location" rather than normal file:// URLs.
  
negative.code:       end;
      end;
  
      if Location.NoteID <> 0 then
         Note := notefile.GetNoteByID( Location.NoteID )
      else
         Note := notefile.GetNoteByName( Location.NoteName );
  
      if  assigned(Note) then begin
          Location.NoteID:= Note.ID;
          Location.NoteName:= Note.Name;
      end;
  
  
      p := pos( KNTLINK_SEPARATOR, LocationStr );
      case p of
        0 : begin
  