Documentation
¶
Index ¶
- Constants
- Variables
- func ApplyStyle(n ast.Node, style string)
- func CopyWithRelativePathPrefix(w io.Writer, source []byte, relativePathPrefix string) (err error)
- func GetFirstHeadingText(source []byte) (result string)
- func IsValidFontFamily(ff string) bool
- func NewColor(s string) (string, error)
- func NewColorFromAny(v any) (string, error)
- func NewParser(theme Theme) parser.Parser
- func NewPlaintextRenderer() renderer.Renderer
- func NewRendererHTML() renderer.Renderer
- func ParseFrontmatter(source []byte, delimeter rune) (frontmatter map[string]any, err error)
- func SplitFrontmatterFromContent(source []byte) (frontmatter, content []byte, delimeter rune, err error)
- func SplitOnLastHorizontalRule(data []byte) (most, tail []byte, ok bool)
- type ActionButtonInjector
- type ActionButtonNode
- type Link
- type Palette
- type Theme
Constants ¶
View Source
const ( FontmatterDelimeterYAML rune = '-' FrontmaterDelimeterTOML rune = '+' FrontmaterDelimeterCue rune = ':' )
Variables ¶
View Source
var ( DefaultLightTheme = Theme{ Color: Palette{ Action: "#3a86ff", Heading: "#11267", Text: "#11226a", Link: "#335c9c", BlockQuote: "#e8ecfb", Border: "#335c4c", Table: "#e8ecfb", Shadow: "#e8ecfb", }, FontFamily: "Georgia", FontSize: 12, } )
View Source
var KindActionButton = ast.NewNodeKind("ActionButton")
Functions ¶
func ApplyStyle ¶ added in v0.2.3
func CopyWithRelativePathPrefix ¶ added in v0.0.5
func GetFirstHeadingText ¶ added in v0.1.8
func IsValidFontFamily ¶ added in v0.2.6
func NewColorFromAny ¶ added in v0.2.5
func NewPlaintextRenderer ¶ added in v0.0.5
NewPlaintextRenderer creates and returns a new PlaintextRenderer instance.
func NewRendererHTML ¶ added in v0.2.1
func ParseFrontmatter ¶ added in v0.0.5
func SplitFrontmatterFromContent ¶ added in v0.0.5
func SplitOnLastHorizontalRule ¶ added in v0.0.5
Types ¶
type ActionButtonInjector ¶ added in v0.2.0
type ActionButtonInjector struct{}
func (*ActionButtonInjector) RegisterFuncs ¶ added in v0.2.3
func (g *ActionButtonInjector) RegisterFuncs(reg renderer.NodeRendererFuncRegisterer)
type ActionButtonNode ¶ added in v0.2.0
func (*ActionButtonNode) Dump ¶ added in v0.2.0
func (n *ActionButtonNode) Dump(source []byte, level int)
func (*ActionButtonNode) Kind ¶ added in v0.2.0
func (n *ActionButtonNode) Kind() ast.NodeKind
type Link ¶ added in v0.0.5
func CollectLinks ¶ added in v0.0.5
type Palette ¶ added in v0.2.5
Click to show internal directories.
Click to hide internal directories.