diff --git a/gap/DocumentationTree.gd b/gap/DocumentationTree.gd index e91718cc..15298fcb 100644 --- a/gap/DocumentationTree.gd +++ b/gap/DocumentationTree.gd @@ -49,6 +49,7 @@ DeclareOperation( "SectionInTree", [ IsTreeForDocumentation, IsString, IsString DeclareOperation( "SubsectionInTree", [ IsTreeForDocumentation, IsString, IsString, IsString ] ); DeclareOperation( "DocumentationExample", [ IsTreeForDocumentation ] ); DeclareOperation( "DocumentationChunk", [ IsTreeForDocumentation, IsString ] ); +DeclareOperation( "DocumentationChunkContent", [ IsObject ] ); DeclareOperation( "DocumentationManItem", [ IsTreeForDocumentation ] ); DeclareOperation( "SetManItemToDescription", [ IsTreeForDocumentationNode ] ); DeclareOperation( "SetManItemToReturnValue", [ IsTreeForDocumentationNode ] ); diff --git a/gap/DocumentationTree.gi b/gap/DocumentationTree.gi index 1edb3411..141ad8f8 100644 --- a/gap/DocumentationTree.gi +++ b/gap/DocumentationTree.gi @@ -104,6 +104,13 @@ BindGlobal( "TheTypeOfDocumentationTreeExampleNodes", NewType( TheFamilyOfDocumentationTreeNodes, IsTreeForDocumentationExampleNodeRep ) ); + +## DeclareRepresentation +DeclareRepresentation( "IsTreeForDocumentationChunkContentNodeRep", IsTreeForDocumentationNodeRep, [ ] ); +BindGlobal( "TheTypeOfDocumentationTreeChunkContentNodes", NewType( TheFamilyOfDocumentationTreeNodes, IsTreeForDocumentationChunkContentNodeRep ) ); + + + ################################### ## ## Tools @@ -230,6 +237,16 @@ InstallMethod( DocumentationChunk, [ IsTreeForDocumentation, IsString ], return node; end ); +## +InstallMethod( DocumentationChunkContent, [ IsObject ], + function( content ) + local node; + + node := rec( content := content ); + ObjectifyWithAttributes( node, TheTypeOfDocumentationTreeChunkContentNodes ); + return node; +end ); + ## InstallMethod( DocumentationManItem, [ IsTreeForDocumentation ], function( tree ) @@ -588,6 +605,14 @@ InstallMethod( WriteDocumentation, [ IsTreeForDocumentationChunkNodeRep, IsStrea WriteDocumentation( Concatenation( "<#Include Label=\"", Label( node ), "\">" ), filestream, level_value ); end ); +InstallMethod( WriteDocumentation, [ IsTreeForDocumentationChunkContentNodeRep, IsStream, IsInt ], + function( node, filestream, level_value ) + local s; + for s in node!.content do + AppendTo( filestream, s ); + od; +end ); + ## InstallMethod( WriteDocumentation, [ IsTreeForDocumentationExampleNodeRep, IsStream, IsInt ], function( node, filestream, level_value ) diff --git a/gap/Parser.gi b/gap/Parser.gi index d8020b53..297e7bb9 100644 --- a/gap/Parser.gi +++ b/gap/Parser.gi @@ -415,7 +415,7 @@ InstallGlobalFunction( AutoDoc_Parser_ReadFiles, local code, temp_curr_line, comment_pos, before_comment; code := [ "