Skip to content

Commit

Permalink
Fix methods to generate new rich text types
Browse files Browse the repository at this point in the history
  • Loading branch information
kelseymills committed Nov 6, 2024
1 parent 3601e01 commit e7279fc
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions block_rich_text.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down Expand Up @@ -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,
},
}
}

Expand Down

0 comments on commit e7279fc

Please sign in to comment.