diff options
author | Tulir Asokan <tulir@maunium.net> | 2019-04-10 22:49:33 +0300 |
---|---|---|
committer | Tulir Asokan <tulir@maunium.net> | 2019-04-10 22:49:33 +0300 |
commit | a9199dd9f2fa4b79a3c8b16d2cd46446651fdb81 (patch) | |
tree | 1483d3b282f81b9367fefddd5f03053c4c9d171a /ui/messages/html/blockquote.go | |
parent | db0e24ccc268d0a9c7575d660a9397e53747894b (diff) |
Split container/text HTML entities and add support for <hr>
Diffstat (limited to 'ui/messages/html/blockquote.go')
-rw-r--r-- | ui/messages/html/blockquote.go | 14 |
1 files changed, 8 insertions, 6 deletions
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) } |