* fixes #40893 using Otherfiles parameter to fpdoc with CHM backend.

This commit is contained in:
marcoonthegit 2024-08-24 17:25:51 +02:00
parent 0a6344270a
commit 4b4e40dbc9
2 changed files with 4 additions and 4 deletions

View File

@ -154,13 +154,13 @@ type
Property BaseImageURL : String Read FBaseImageURL Write FBaseImageURL; Property BaseImageURL : String Read FBaseImageURL Write FBaseImageURL;
end; end;
Function FixHTMLpath(S : String) : STring; Function FixHTMLpath(const S : String) : STring;
implementation implementation
uses fpdocstrs, xmlread, sysutils, sh_pas; uses fpdocstrs, xmlread, sysutils, sh_pas;
Function FixHTMLpath(S : String) : STring; Function FixHTMLpath(const S : String) : STring;
begin begin
Result:=StringReplace(S,'\','/',[rfReplaceAll]); Result:=StringReplace(S,'\','/',[rfReplaceAll]);

View File

@ -212,7 +212,7 @@ end;
function TCHMHTMLWriter.RetrieveOtherFiles(const DataName: String; out function TCHMHTMLWriter.RetrieveOtherFiles(const DataName: String; out
PathInChm: String; out FileName: String; var Stream: TStream): Boolean; PathInChm: String; out FileName: String; var Stream: TStream): Boolean;
begin begin
Result:=True; Result:=False;
if Stream <> nil then if Stream <> nil then
Stream.Free; Stream.Free;
Stream := TMemoryStream.Create; Stream := TMemoryStream.Create;
@ -223,7 +223,7 @@ begin
PathInChm := ExtractRelativepath(GetCurrentDir, ExtractFileDir(DataName)) PathInChm := ExtractRelativepath(GetCurrentDir, ExtractFileDir(DataName))
else else
PathInChm := '/'; PathInChm := '/';
FixHTMLpath(PathInChm); PathInChm:=FixHTMLpath(IncludeLeadingPathDelimiter(IncludeTrailingPathDelimiter(PathInChm)));
Stream.Position := 0; Stream.Position := 0;
end; end;