highlight

package
v0.0.0-...-85b91c5 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: MIT Imports: 15 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Code

func Code(fileName, language, code string) string

Code returns a HTML version of code string with chroma syntax highlighting classes

func CodeFromLexer

func CodeFromLexer(lexer chroma.Lexer, code string) string

CodeFromLexer returns a HTML version of code string with chroma syntax highlighting classes

func File

func File(numLines int, fileName, language string, code []byte) []string

File returns a slice of chroma syntax highlighted lines of code

func NewContext

func NewContext()

NewContext loads custom highlight map from local config

Types

This section is empty.

Jump to

Keyboard shortcuts

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