Documentation
¶
Overview ¶
Package highlight provides chroma-based syntax highlighting for fenced code blocks in goldmark-rendered Markdown.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Theme is a chroma style name (e.g. "github", "monokai", "dracula").
// Defaults to "github".
Theme string
// LineNumbers enables line number display.
LineNumbers bool
}
Config holds syntax highlighting settings derived from config.yaml.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns the default highlighting configuration.
type Highlighter ¶
type Highlighter struct {
// contains filtered or unexported fields
}
Highlighter renders fenced code blocks with chroma.
func (*Highlighter) Extension ¶
func (h *Highlighter) Extension() goldmark.Extender
Extension returns a goldmark.Extender that replaces the default fenced-code- block renderer with chroma-based highlighting.
Click to show internal directories.
Click to hide internal directories.