aboutsummaryrefslogtreecommitdiff
path: root/ui/messages/html/codeblock.go
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2019-04-10 22:49:33 +0300
committerTulir Asokan <tulir@maunium.net>2019-04-10 22:49:33 +0300
commita9199dd9f2fa4b79a3c8b16d2cd46446651fdb81 (patch)
tree1483d3b282f81b9367fefddd5f03053c4c9d171a /ui/messages/html/codeblock.go
parentdb0e24ccc268d0a9c7575d660a9397e53747894b (diff)
Split container/text HTML entities and add support for <hr>
Diffstat (limited to 'ui/messages/html/codeblock.go')
-rw-r--r--ui/messages/html/codeblock.go14
1 files changed, 8 insertions, 6 deletions
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,
}
}