mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-22 12:19:28 +01:00
* fixes #40893 using Otherfiles parameter to fpdoc with CHM backend.
This commit is contained in:
parent
0a6344270a
commit
4b4e40dbc9
@ -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]);
|
||||||
|
|||||||
@ -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;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user