From a9199dd9f2fa4b79a3c8b16d2cd46446651fdb81 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Wed, 10 Apr 2019 22:49:33 +0300 Subject: Split container/text HTML entities and add support for
--- ui/messages/html/blockquote.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'ui/messages/html/blockquote.go') diff --git a/ui/messages/html/blockquote.go b/ui/messages/html/blockquote.go index 17799a2..288d86d 100644 --- a/ui/messages/html/blockquote.go +++ b/ui/messages/html/blockquote.go @@ -24,26 +24,28 @@ import ( ) type BlockquoteEntity struct { - *BaseEntity + *ContainerEntity } const BlockQuoteChar = '>' func NewBlockquoteEntity(children []Entity) *BlockquoteEntity { - return &BlockquoteEntity{&BaseEntity{ - Tag: "blockquote", + return &BlockquoteEntity{&ContainerEntity{ + BaseEntity: &BaseEntity{ + Tag: "blockquote", + Block: true, + }, Children: children, - Block: true, Indent: 2, }} } func (be *BlockquoteEntity) Clone() Entity { - return &BlockquoteEntity{BaseEntity: be.BaseEntity.Clone().(*BaseEntity)} + return &BlockquoteEntity{ContainerEntity: be.ContainerEntity.Clone().(*ContainerEntity)} } func (be *BlockquoteEntity) Draw(screen mauview.Screen) { - be.BaseEntity.Draw(screen) + be.ContainerEntity.Draw(screen) for y := 0; y < be.height; y++ { screen.SetContent(0, y, BlockQuoteChar, nil, be.Style) } -- cgit v1.2.3