Documentation ¶
Index ¶
- func Render(blocks []Block) string
- type Block
- type BlockType
- type CodeRenderer
- type HeadingRenderer
- type Image
- type ImageRenderer
- type LinkRenderer
- type ListFormat
- type ListItemRenderer
- type ListRenderer
- type ParagraphRenderer
- type QuoteRenderer
- type Renderer
- func (r *Renderer) Render(blocks []Block) string
- func (r *Renderer) RenderCode(b Block) string
- func (r *Renderer) RenderHeading(b Block) string
- func (r *Renderer) RenderImage(b Block) string
- func (r *Renderer) RenderLink(b Block) string
- func (r *Renderer) RenderList(b Block) string
- func (r *Renderer) RenderListItem(b Block) string
- func (r *Renderer) RenderParagraph(b Block) string
- func (r *Renderer) RenderQuote(b Block) string
- func (r *Renderer) RenderText(b Block) string
- type TextRenderer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Block ¶
type Block struct { Type BlockType `json:"type"` Children []Block `json:"children"` Text *string `json:"text"` Italic *bool `json:"italic"` Underline *bool `json:"underline"` Bold *bool `json:"bold"` StrikeThrough *bool `json:"strikethrough"` Code *bool `json:"code"` Format *string `json:"format"` URL *string `json:"url"` Level *int `json:"level"` Image *Image `json:"image"` }
type BlockType ¶
type BlockType string
const BlockTypeCode BlockType = "code"
const BlockTypeHeading BlockType = "heading"
const BlockTypeImage BlockType = "image"
const BlockTypeLink BlockType = "link"
const BlockTypeList BlockType = "list"
const BlockTypeListItem BlockType = "list-item"
const BlockTypeParagraph BlockType = "paragraph"
const BlockTypeQuote BlockType = "quote"
const BlockTypeText BlockType = "text"
type CodeRenderer ¶
type HeadingRenderer ¶
type ImageRenderer ¶
type LinkRenderer ¶
type ListFormat ¶
type ListFormat string
const ListFormatOrdered ListFormat = "ordered"
const ListFormatUnordered ListFormat = "unordered"
type ListItemRenderer ¶
type ListRenderer ¶
type ParagraphRenderer ¶
type QuoteRenderer ¶
type Renderer ¶
type Renderer struct { ParagraphRenderer ParagraphRenderer TextRenderer TextRenderer ListRenderer ListRenderer ListItemRenderer ListItemRenderer HeadingRenderer HeadingRenderer LinkRenderer LinkRenderer ImageRenderer ImageRenderer QuoteRenderer QuoteRenderer CodeRenderer CodeRenderer }
func (*Renderer) RenderCode ¶
func (*Renderer) RenderHeading ¶
func (*Renderer) RenderImage ¶
func (*Renderer) RenderLink ¶
func (*Renderer) RenderList ¶
func (*Renderer) RenderListItem ¶
func (*Renderer) RenderParagraph ¶
func (*Renderer) RenderQuote ¶
func (*Renderer) RenderText ¶
type TextRenderer ¶
Click to show internal directories.
Click to hide internal directories.