mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 09:36:10 +02:00
wiki: Fix links to local wiki files
git-svn-id: trunk@49357 -
This commit is contained in:
parent
6b67ca24c9
commit
e2b4261852
@ -526,10 +526,19 @@ var
|
||||
URL:=GetPageLink(TargetPage);
|
||||
if Anchor<>'' then
|
||||
URL+='#'+Anchor;
|
||||
end else if ((FileName <> '') and not FileExistsUTF8(Filename)) then begin
|
||||
if WarnMissingPageLinks and WarnURL(LinkToken.Link) then
|
||||
Log('WARNING: TWiki2XHTMLConverter.InsertLink "'+dbgstr(LinkToken.Link)+'": file not found: "'+Filename+'" at '+W.PosToStr(LinkToken.LinkStartPos,true));
|
||||
URL:='';
|
||||
end else
|
||||
if (FileName <> '') then begin
|
||||
if FileExistsUTF8(OutputDir+Filename) or
|
||||
(GetPageWithDocumentName(DocumentName) <> nil) // will be converted lated
|
||||
then
|
||||
URL := Filename
|
||||
else begin
|
||||
if WarnMissingPageLinks and WarnURL(LinkToken.Link) then
|
||||
Log('WARNING: TWiki2XHTMLConverter.InsertLink "'+
|
||||
dbgstr(LinkToken.Link)+'": file not found: "'+Filename+'" at '+
|
||||
W.PosToStr(LinkToken.LinkStartPos,true)+'. Linking to online version.');
|
||||
URL := Page.WikiPage.BaseURL + '/' + DocumentName;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user