From a34ee0ddb80ab6a7fabd491562694a8bf76bbf55 Mon Sep 17 00:00:00 2001 From: andrew Date: Sat, 10 Mar 2012 14:52:06 +0000 Subject: [PATCH] Fixed chm index's every other line being blank. Fixed chm files having double slashes. Now images load properly. git-svn-id: trunk@35870 - --- components/wiki/lazwiki/wiki2chmconvert.pas | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/components/wiki/lazwiki/wiki2chmconvert.pas b/components/wiki/lazwiki/wiki2chmconvert.pas index 5dcfb6b1c2..2ce7ff9977 100644 --- a/components/wiki/lazwiki/wiki2chmconvert.pas +++ b/components/wiki/lazwiki/wiki2chmconvert.pas @@ -94,8 +94,11 @@ begin inc(FilesCompressed); debugln(['chm processing ',FilesCompressed,' of ',Writer.FilesToCompress.Count,' "',DataName,'" ...']); Result := False; // Return true to abort compressing files - Filename:=DataName; - PathInChm:='/'; + Filename:=ExtractFileName(DataName); + PathInChm:='/'+ExtractFilePath(DataName); + // cleanup string + PathInChm:=StringReplace(PathInChm, '\','/',[rfReplaceAll]); + PathInChm:=StringReplace(PathInChm, '//','/',[rfReplaceAll]); Page:=TW2CHMPage(DocumentNameToPage[DataName]); if Page<>nil then begin // a page @@ -159,7 +162,6 @@ begin wl('
  • '); wl(' '); wl(' '); - wl(' '); end; finally List.Free;