Documentation ¶
Overview ¶
Package markdown transforms markdown text into gio richtext.
Index ¶
Constants ¶
View Source
const MetadataURL = "url"
MetadataURL is the metadata key that the parser will set for hyperlinks detected within the markdown.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { DefaultFont font.Font MonospaceFont font.Font // Defaults to 12 if unset. DefaultSize unit.Sp // If unset, each level will be 1.2 times larger than the previous. H1Size, H2Size, H3Size, H4Size, H5Size, H6Size unit.Sp // Defaults to black. DefaultColor color.NRGBA // Defaults to blue. InteractiveColor color.NRGBA }
Config defines settings used by the renderer.
type Renderer ¶
type Renderer struct { // Config defines how the various markdown elements are presented. // If left as the zero value, sane defaults will be used. Config Config // contains filtered or unexported fields }
Renderer can transform source markdown into Gio richtext. Hyperlinks will result in text that has the URL set as span metadata with key MetadataURL.
func NewRenderer ¶
func NewRenderer() *Renderer
NewRenderer creates a ready-to-use markdown renderer.
Click to show internal directories.
Click to hide internal directories.