mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-05 08:09:52 +01:00
* handle hexadecimal nubmer starting with 'x'
handle ff,fl,fi special html tags git-svn-id: trunk@5868 -
This commit is contained in:
parent
52b72564e9
commit
8b8db4c1a9
@ -352,14 +352,17 @@ end;
|
||||
|
||||
function THTMLParser.DocDecodeNamedEntity(Name: string; var E: string): boolean;
|
||||
var Found: boolean;
|
||||
Code: integer;
|
||||
CC: integer;
|
||||
Code: word;
|
||||
CC: word;
|
||||
begin
|
||||
Found:=true; Code:=-1;
|
||||
Name:=LowCaseStr(Name);
|
||||
if copy(Name,1,1)='#' then
|
||||
begin
|
||||
Val(copy(Name,2,255),Code,CC);
|
||||
if Name[2]='x' then
|
||||
Val('$'+copy(Name,3,255),Code,CC)
|
||||
else
|
||||
Val(copy(Name,2,255),Code,CC);
|
||||
if CC<>0 then Code:=-1;
|
||||
end;
|
||||
if (Name='lt') then E:='<' else { less-than sign }
|
||||
@ -463,6 +466,9 @@ begin
|
||||
(* if (Code=254) or (Name='thorn') then E:='?' else { small thorn, Icelandic }*)
|
||||
if (Code=255) or (Name='yuml') then E:='y' else { small y, dieresis or umlaut }
|
||||
if (Code=8217) then E:='''' else { acute accent as generated by TeXH }
|
||||
if (Code=$FB00) then E:='ff' else { ff together }
|
||||
if (Code=$FB01) then E:='fi' else { fi together }
|
||||
if (Code=$FB02) then E:='fl' else { fl together }
|
||||
Found:=false;
|
||||
DocDecodeNamedEntity:=Found;
|
||||
end;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user