Versions in this module Expand all Collapse all v1 v1.0.3 Apr 29, 2024 v1.0.2 Apr 25, 2024 Changes in this version + var DefaultHTMLConfig = HTMLConfig + func Annotate(src []byte, a Annotator) (annotate.Annotations, error) + func AsHTML(src []byte, options ...Option) ([]byte, error) + func NewScanner(src []byte) *scanner.Scanner + func NewScannerReader(src io.Reader) *scanner.Scanner + func Print(s *scanner.Scanner, w io.Writer, p Printer) error + type Annotator interface + Annotate func(start int, kind Kind, tokText string) (*annotate.Annotation, error) + type HTMLAnnotator HTMLConfig + func (a HTMLAnnotator) Annotate(start int, kind Kind, tokText string) (*annotate.Annotation, error) + type HTMLConfig struct + AsOrderedList bool + Comment string + Decimal string + HTMLAttrName string + HTMLAttrValue string + HTMLTag string + Keyword string + Literal string + Plaintext string + Punctuation string + String string + Tag string + Type string + Whitespace string + func (c HTMLConfig) Class(kind Kind) string + type HTMLPrinter HTMLConfig + func (p HTMLPrinter) Print(w io.Writer, kind Kind, tokText string) error + type Kind uint8 + const Comment + const Decimal + const HTMLAttrName + const HTMLAttrValue + const HTMLTag + const Keyword + const Literal + const Plaintext + const Punctuation + const String + const Tag + const Type + const Whitespace + func TokenKind(tok rune, tokText string) Kind + func (i Kind) GoString() string + type Option func(options *HTMLConfig) + func OrderedList() Option + type Printer interface + Print func(w io.Writer, kind Kind, tokText string) error