From e7279fc503100fe7e48843c59a92b89acad2a350 Mon Sep 17 00:00:00 2001 From: Kelsey Mills Date: Wed, 6 Nov 2024 15:23:30 +0000 Subject: [PATCH] Fix methods to generate new rich text types --- block_rich_text.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/block_rich_text.go b/block_rich_text.go index 26b3bd60..706bbf1d 100644 --- a/block_rich_text.go +++ b/block_rich_text.go @@ -487,8 +487,8 @@ func (r RichTextSectionUnknownElement) RichTextSectionElementType() RichTextSect // RichTextQuote represents rich_text_quote element type. type RichTextQuote RichTextSection -func NewRichTextSectionQuote(elements ...RichTextSectionElement) *RichTextSection { - return &RichTextSection{ +func NewRichTextSectionQuote(elements ...RichTextSectionElement) *RichTextQuote { + return &RichTextQuote{ Type: RTEQuote, Elements: elements, } @@ -520,10 +520,12 @@ type RichTextPreformatted struct { Border int `json:"border"` } -func NewRichTextSectionPreformatted(elements ...RichTextSectionElement) *RichTextSection { - return &RichTextSection{ - Type: RTEPreformatted, - Elements: elements, +func NewRichTextSectionPreformatted(elements ...RichTextSectionElement) *RichTextPreformatted { + return &RichTextPreformatted{ + RichTextSection: RichTextSection{ + Type: RTEPreformatted, + Elements: elements, + }, } }