Documentation
¶
Overview ¶
Package alert provides a Goldmark extension for GitHub-style alerts. It transforms blockquotes with [!NOTE], [!TIP], [!IMPORTANT], [!WARNING], or [!CAUTION] into styled alert blocks matching GitHub's markdown rendering.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var KindAlert = ast.NewNodeKind("Alert")
KindAlert is the kind for Alert nodes
Functions ¶
func NewHTMLRenderer ¶
func NewHTMLRenderer(opts ...html.Option) renderer.NodeRenderer
NewHTMLRenderer creates a new HTMLRenderer
Types ¶
type AlertType ¶
type AlertType string
AlertType represents the type of alert (note, tip, important, warning, caution)
type HTMLRenderer ¶
HTMLRenderer renders Alert nodes to HTML
func (*HTMLRenderer) RegisterFuncs ¶
func (r *HTMLRenderer) RegisterFuncs(reg renderer.NodeRendererFuncRegisterer)
RegisterFuncs registers rendering functions
type Transformer ¶
type Transformer struct{}
Transformer is a transformer that converts blockquotes with alert syntax to Alert nodes
Click to show internal directories.
Click to hide internal directories.