Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StyleEntryToCSS ¶
func StyleEntryToCSS(e chroma.StyleEntry) string
StyleEntryToCSS converts a chroma.StyleEntry to CSS attributes.
Types ¶
type Formatter ¶
type Formatter struct {
// contains filtered or unexported fields
}
Formatter that generates HTML.
type Option ¶
type Option func(f *Formatter)
Option sets an option of the HTML formatter.
func BaseLineNumber ¶
BaseLineNumber sets the initial number to start line numbering at. Defaults to 1.
func HighlightLines ¶
HighlightLines higlights the given line ranges with the Highlight style.
A range is the beginning and ending of a range as 1-based line numbers, inclusive.
func Standalone ¶
func Standalone() Option
Standalone configures the HTML formatter for generating a standalone HTML document.
func WithClasses ¶
func WithClasses() Option
WithClasses emits HTML using CSS classes, rather than inline styles.
func WithLineNumbers ¶
func WithLineNumbers() Option
WithLineNumbers formats output with line numbers.
Click to show internal directories.
Click to hide internal directories.