syntax

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package syntax colors code with chroma. It emits only foreground codes and resets, never a full reset, so an enclosing background such as a diff line's survives.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func File added in v1.0.0

func File(code, path string) string

File returns code unchanged when no lexer matches path.

func Lang added in v1.0.0

func Lang(code, lang string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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