|
@@ -113,6 +113,7 @@ type
|
|
|
FIndexColCount : Integer;
|
|
|
FSearchPage : String;
|
|
|
FBaseImageURL : String;
|
|
|
+ FUseMenuBrackets: Boolean;
|
|
|
|
|
|
Procedure CreateAllocator; virtual;
|
|
|
function ResolveLinkID(const Name: String): DOMString;
|
|
@@ -268,6 +269,7 @@ type
|
|
|
Property CharSet : String Read FCharSet Write FCharSet;
|
|
|
Property IndexColCount : Integer Read FIndexColCount write FIndexColCount;
|
|
|
Property BaseImageURL : String Read FBaseImageURL Write FBaseImageURL;
|
|
|
+ Property UseMenuBrackets : Boolean Read FUseMenuBrackets write FUseMenuBrackets;
|
|
|
end;
|
|
|
|
|
|
THTMWriter = class(THTMLWriter)
|
|
@@ -618,6 +620,10 @@ var
|
|
|
|
|
|
begin
|
|
|
inherited ;
|
|
|
+
|
|
|
+ // should default to true since this is the old behavior
|
|
|
+ UseMenuBrackets:=True;
|
|
|
+
|
|
|
IndexColCount:=3;
|
|
|
Charset:='iso-8859-1';
|
|
|
CreateAllocator;
|
|
@@ -1914,9 +1920,11 @@ var
|
|
|
|
|
|
procedure AddLink(El : TPasElement; const AName: String);
|
|
|
begin
|
|
|
- AppendText(ParaEl, '[');
|
|
|
+ if FUseMenuBrackets then
|
|
|
+ AppendText(ParaEl, '[');
|
|
|
AppendText(CreateLink(ParaEl, ResolveLinkWithinPackage(El,0)),AName);
|
|
|
- AppendText(ParaEl, ']');
|
|
|
+ if FUseMenuBrackets then
|
|
|
+ AppendText(ParaEl, ']');
|
|
|
end;
|
|
|
|
|
|
begin
|
|
@@ -1936,9 +1944,11 @@ begin
|
|
|
AddLink(Topic.Next,SDocNext);
|
|
|
if Length(SearchPage) > 0 then
|
|
|
begin
|
|
|
- AppendText(ParaEl, '[');
|
|
|
+ if FUseMenuBrackets then
|
|
|
+ AppendText(ParaEl, '[');
|
|
|
AppendText(CreateLink(ParaEl, SearchPage), SDocSearch);
|
|
|
- AppendText(ParaEl, ']');
|
|
|
+ if FUseMenuBrackets then
|
|
|
+ AppendText(ParaEl, ']');
|
|
|
end;
|
|
|
ParaEl := CreateTD(TREl);
|
|
|
ParaEl['align'] := 'right';
|
|
@@ -1961,14 +1971,16 @@ var
|
|
|
|
|
|
procedure AddLink(ALinkSubpageIndex: Integer; const AName: String);
|
|
|
begin
|
|
|
- AppendText(ParaEl, '[');
|
|
|
+ if FUseMenuBrackets then
|
|
|
+ AppendText(ParaEl, '[');
|
|
|
if ALinkSubpageIndex = ASubpageIndex then
|
|
|
AppendText(ParaEl, AName)
|
|
|
else
|
|
|
AppendText(
|
|
|
CreateLink(ParaEl, ResolveLinkWithinPackage(Module, ALinkSubpageIndex)),
|
|
|
AName);
|
|
|
- AppendText(ParaEl, ']');
|
|
|
+ if FUseMenuBrackets then
|
|
|
+ AppendText(ParaEl, ']');
|
|
|
end;
|
|
|
|
|
|
begin
|
|
@@ -2001,21 +2013,25 @@ begin
|
|
|
else
|
|
|
begin
|
|
|
// Manually add link for package page
|
|
|
- AppendText(ParaEl, '[');
|
|
|
+ if FUseMenuBrackets then
|
|
|
+ AppendText(ParaEl, '[');
|
|
|
if (IndexSubIndex = ASubpageIndex) then
|
|
|
AppendText(ParaEl, SDocIdentifierIndex)
|
|
|
else
|
|
|
AppendText(
|
|
|
CreateLink(ParaEl, ResolveLinkWithinPackage(Package, IndexSubIndex)),
|
|
|
SDocIdentifierIndex);
|
|
|
- AppendText(ParaEl, ']');
|
|
|
+ if FUseMenuBrackets then
|
|
|
+ AppendText(ParaEl, ']');
|
|
|
end;
|
|
|
|
|
|
if Length(SearchPage) > 0 then
|
|
|
begin
|
|
|
- AppendText(ParaEl, '[');
|
|
|
+ if FUseMenuBrackets then
|
|
|
+ AppendText(ParaEl, '[');
|
|
|
AppendText(CreateLink(ParaEl, SearchPage), SDocSearch);
|
|
|
- AppendText(ParaEl, ']');
|
|
|
+ if FUseMenuBrackets then
|
|
|
+ AppendText(ParaEl, ']');
|
|
|
end;
|
|
|
ParaEl := CreateTD(TREl);
|
|
|
ParaEl['align'] := 'right';
|
|
@@ -2841,7 +2857,8 @@ var
|
|
|
var
|
|
|
LinkEl: TDOMElement;
|
|
|
begin
|
|
|
- AppendText(ParaEl, '[');
|
|
|
+ if FUseMenuBrackets then
|
|
|
+ AppendText(ParaEl, '[');
|
|
|
LinkEl := CreateEl(ParaEl, 'a');
|
|
|
LinkEl['href'] :=
|
|
|
FixHtmlPath(ResolveLinkWithinPackage(AClass, AListSubpageIndex));
|
|
@@ -2856,7 +2873,10 @@ var
|
|
|
'''dependent=yes,resizable=yes,scrollbars=yes,height=400,width=300''); return false;';
|
|
|
AppendText(LinkEl, SDocByName);
|
|
|
AppendText(ParaEl, ')');
|
|
|
- AppendText(ParaEl, '] ');
|
|
|
+ if FUseMenuBrackets then
|
|
|
+ AppendText(ParaEl, '] ')
|
|
|
+ else
|
|
|
+ AppendText(ParaEl, ' ');
|
|
|
end;
|
|
|
|
|
|
procedure AppendGenericTypes(CodeEl : TDomElement; AList : TFPList; isSpecialize : Boolean);
|
|
@@ -3433,6 +3453,7 @@ Function THTMLWriter.InterPretOption(Const Cmd,Arg : String) : boolean;
|
|
|
|
|
|
begin
|
|
|
Result:=True;
|
|
|
+
|
|
|
if Cmd = '--html-search' then
|
|
|
SearchPage := Arg
|
|
|
else if Cmd = '--footer' then
|
|
@@ -3450,6 +3471,8 @@ begin
|
|
|
FIDF:=True;
|
|
|
FDateFormat:=Arg;
|
|
|
end
|
|
|
+ else if Cmd = '--disable-menu-brackets' then
|
|
|
+ FUseMenuBrackets:=False
|
|
|
else
|
|
|
Result:=False;
|
|
|
end;
|
|
@@ -3474,6 +3497,8 @@ begin
|
|
|
List.Add(SHTMLIndexColcount);
|
|
|
List.Add('--image-url=url');
|
|
|
List.Add(SHTMLImageUrl);
|
|
|
+ List.Add('--disable-menu-brackets');
|
|
|
+ List.Add(SHTMLDisableMenuBrackets);
|
|
|
end;
|
|
|
|
|
|
Class Function THTMLWriter.FileNameExtension : String;
|