package chromalexers

import "github.com/gohugoio/hugo/markup/highlight/chromalexers"

Index

Functions

func Get

func Get(name string) chroma.Lexer

Get returns a lexer for the given language name, nil if not found. This is just a wrapper around chromalexers.Get that caches the result. Reasoning for this is that chromalexers.Get is slow in the case where the lexer is not found, which is a common case in Hugo.

Source Files

chromalexers.go

Version
v0.145.0 (latest)
Published
Feb 26, 2025
Platform
linux/amd64
Imports
3 packages
Last checked
4 hours ago

Tools for package owners.