highlight

package
v0.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2025 License: 0BSD Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Highlight

func Highlight(code string, language string, theme Theme) (string, error)

Types

type Theme

type Theme struct {
	Color           *string `json:"color,omitempty"`
	BackgroundColor *string `json:"backgroundColor,omitempty"`
	LineNumbers     *struct {
		Color      string `json:"color"`
		RightSpace *uint  `json:"rightSpace,omitempty"`
	} `json:"lineNumbers,omitempty"`
	Highlights *map[string]struct {
		Color           *string `json:"color,omitempty"`
		FontWeight      *uint   `json:"fontWeight,omitempty"`
		FontStyle       *string `json:"fontStyle,omitempty"`
		BackgroundColor *string `json:"backgroundColor,omitempty"`
	} `json:"highlights,omitempty"`
}

func NewTheme

func NewTheme(theme string) (Theme, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL