highlight

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Span

type Span struct {
	Text string
	Kind string // "plain", "keyword", "string", "number", "property", "comment", "operator"
}

Span represents a styled segment of text.

func Highlight

func Highlight(src string) []Span

Highlight parses a JavaScript expression and returns colored spans.

Jump to

Keyboard shortcuts

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