mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-02 11:52:37 +02:00
IDE: Fix HTML hint to show special chars ("<", ">") for generics. Issue #20012, patch from Anton
git-svn-id: trunk@32007 -
This commit is contained in:
parent
6232d1d0e7
commit
19ff4dd485
@ -355,6 +355,7 @@ begin
|
||||
while (EndPos<=length(Result)) do begin
|
||||
if Result[EndPos]='"' then begin
|
||||
// skip " tag
|
||||
inc(EndPos);
|
||||
while (EndPos<=length(Result)) and (Result[EndPos]<>'"') do
|
||||
inc(EndPos);
|
||||
if EndPos>length(Result) then break;
|
||||
@ -434,6 +435,28 @@ begin
|
||||
end
|
||||
else
|
||||
Result:=copy(Result,1,p-1)+copy(Result,EndPos,length(Result));
|
||||
end else if Result[p]='&' then begin
|
||||
// special chars: < > &
|
||||
if (Result[p+1]='l') and (Result[p+2]='t') then begin
|
||||
EndPos:=p+3;
|
||||
if (EndPos<length(Result)) and (Result[EndPos]=';') then
|
||||
inc(EndPos);
|
||||
Result:=copy(Result,1,p-1)+'<'+copy(Result,EndPos,length(Result));
|
||||
end else
|
||||
if (Result[p+1]='g') and (Result[p+2]='t') then begin
|
||||
EndPos:=p+3;
|
||||
if (EndPos<length(Result)) and (Result[EndPos]=';') then
|
||||
inc(EndPos);
|
||||
Result:=copy(Result,1,p-1)+'>'+copy(Result,EndPos,length(Result));
|
||||
end else
|
||||
if (Result[p+1]='a') and (Result[p+2]='m') and (Result[p+3]='p') then begin
|
||||
EndPos:=p+4;
|
||||
if (EndPos<length(Result)) and (Result[EndPos]=';') then
|
||||
inc(EndPos);
|
||||
// double '&' to prevent underlining
|
||||
Result:=copy(Result,1,p-1)+'&&'+copy(Result,EndPos,length(Result));
|
||||
end;
|
||||
inc(p);
|
||||
end else
|
||||
inc(p);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user