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/codeblock.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'ui/messages/html/codeblock.go') diff --git a/ui/messages/html/codeblock.go b/ui/messages/html/codeblock.go index 4a0766c..7f6b462 100644 --- a/ui/messages/html/codeblock.go +++ b/ui/messages/html/codeblock.go @@ -22,15 +22,17 @@ import ( ) type CodeBlockEntity struct { - *BaseEntity + *ContainerEntity Background tcell.Style } func NewCodeBlockEntity(children []Entity, background tcell.Style) *CodeBlockEntity { return &CodeBlockEntity{ - BaseEntity: &BaseEntity{ - Tag: "pre", - Block: true, + ContainerEntity: &ContainerEntity{ + BaseEntity: &BaseEntity{ + Tag: "pre", + Block: true, + }, Children: children, }, Background: background, @@ -39,8 +41,8 @@ func NewCodeBlockEntity(children []Entity, background tcell.Style) *CodeBlockEnt func (ce *CodeBlockEntity) Clone() Entity { return &CodeBlockEntity{ - BaseEntity: ce.BaseEntity.Clone().(*BaseEntity), - Background: ce.Background, + ContainerEntity: ce.ContainerEntity.Clone().(*ContainerEntity), + Background: ce.Background, } } -- cgit v1.2.3