mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 17:26:35 +02:00
* Fix memleak, additional list/indent, patch from Andrey Sobol
git-svn-id: trunk@48091 -
(cherry picked from commit cccff5826e
)
This commit is contained in:
parent
63cc204ac6
commit
96fe2661fd
@ -21,8 +21,8 @@ uses
|
||||
Classes, SysUtils, dwriter, DOM, pastree, dglobals;
|
||||
|
||||
Const
|
||||
MaxIndents = 10;
|
||||
MaxLists = 10;
|
||||
MaxIndents = 32;
|
||||
MaxLists = 32;
|
||||
|
||||
Type
|
||||
THeaderLevel = 1..6;
|
||||
@ -842,6 +842,7 @@ end;
|
||||
destructor TBaseMarkdownWriter.Destroy;
|
||||
begin
|
||||
FreeAndNil(FMarkDown);
|
||||
FreeAndNil(FMetadata);
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
|
@ -124,7 +124,6 @@ type
|
||||
procedure WriteDocPage(const aFileName: String; aElement: TPasElement; aSubPageIndex: Integer); override;
|
||||
|
||||
// Start producing html complete package documentation
|
||||
function ModuleForElement(AnElement:TPasElement):TPasModule;
|
||||
|
||||
Function InterPretOption(Const Cmd,Arg : String) : boolean; override;
|
||||
Procedure WriteDoc; override;
|
||||
@ -326,18 +325,6 @@ begin
|
||||
Result:=FHeaderMarkDown;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
function TMarkdownWriter.ModuleForElement(AnElement:TPasElement):TPasModule;
|
||||
|
||||
begin
|
||||
result:=TPasModule(AnElement);
|
||||
while assigned(result) and not (result is TPasModule) do
|
||||
result:=TPasModule(result.parent);
|
||||
if not (result is TPasModule) then
|
||||
result:=nil;
|
||||
end;
|
||||
|
||||
procedure TMarkdownWriter.AppendShortDescr(AContext: TPasElement; DocNode: TDocNode) ;
|
||||
|
||||
Var
|
||||
@ -715,7 +702,7 @@ begin
|
||||
|
||||
DescrEndTableCell;
|
||||
DescrBeginTableCell;
|
||||
DescrEl:=Engine.FindShortDescr(ModuleForElement(AElement),UTF8Encode(aList[i]));
|
||||
DescrEl:=Engine.FindShortDescr(AElement.GetModule(),UTF8Encode(aList[i]));
|
||||
if Assigned(DescrEl) then
|
||||
ConvertShort(AElement, DescrEl)
|
||||
else
|
||||
@ -882,7 +869,7 @@ type
|
||||
PE:=EN.Element;
|
||||
DescrBeginListItem;
|
||||
AppendHyperLink(PE);
|
||||
PM:=ModuleForElement(PE);
|
||||
PM:=PE.GetModule();
|
||||
if (PM<>Nil) then
|
||||
begin
|
||||
AppendText(' (');
|
||||
|
@ -282,7 +282,7 @@ Type
|
||||
procedure AllocateClassMemberPages(AModule: TPasModule; LinkList: TObjectList); virtual;
|
||||
procedure AllocateModulePages(AModule: TPasModule; LinkList: TObjectList); virtual;
|
||||
procedure AllocatePackagePages; virtual;
|
||||
// Prefix every filename generated with the eesult of this.
|
||||
// Prefix every filename generated with the result of this.
|
||||
function GetFileBaseDir(aOutput: String): String; virtual;
|
||||
|
||||
function ModuleHasClasses(AModule: TPasModule): Boolean;
|
||||
|
Loading…
Reference in New Issue
Block a user