github.com/nhannv/mattermost-server@v5.11.1+incompatible/utils/markdown/document.go (about)

     1  // Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
     2  // See License.txt for license information.
     3  
     4  package markdown
     5  
     6  type Document struct {
     7  	blockBase
     8  
     9  	Children []Block
    10  }
    11  
    12  func (b *Document) Continuation(indentation int, r Range) *continuation {
    13  	return &continuation{
    14  		Indentation: indentation,
    15  		Remaining:   r,
    16  	}
    17  }
    18  
    19  func (b *Document) AddChild(openBlocks []Block) []Block {
    20  	b.Children = append(b.Children, openBlocks[0])
    21  	return openBlocks
    22  }