Fixed chm index's every other line being blank.

Fixed chm files having double slashes. Now images load properly.

git-svn-id: trunk@35870 -
This commit is contained in:
andrew 2012-03-10 14:52:06 +00:00
parent f242a18097
commit a34ee0ddb8

View File

@ -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(' <li> <object type="text/sitemap">');
wl(' <param name="Name" value="'+StrToXMLValue(Page.WikiPage.Title)+'">');
wl(' <param name="Local" value="'+StrToXMLValue(GetPageLink(Page))+'">');
wl(' <object type="text/sitemap">');
end;
finally
List.Free;