mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-09 05:56:05 +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
|
while (EndPos<=length(Result)) do begin
|
||||||
if Result[EndPos]='"' then begin
|
if Result[EndPos]='"' then begin
|
||||||
// skip " tag
|
// skip " tag
|
||||||
|
inc(EndPos);
|
||||||
while (EndPos<=length(Result)) and (Result[EndPos]<>'"') do
|
while (EndPos<=length(Result)) and (Result[EndPos]<>'"') do
|
||||||
inc(EndPos);
|
inc(EndPos);
|
||||||
if EndPos>length(Result) then break;
|
if EndPos>length(Result) then break;
|
||||||
@ -434,6 +435,28 @@ begin
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
Result:=copy(Result,1,p-1)+copy(Result,EndPos,length(Result));
|
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
|
end else
|
||||||
inc(p);
|
inc(p);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user