Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Languages map[string]getFunc
Functions ¶
func Get ¶
Gets one of the built-in languages using the name input. If the language exists, it is returned in lang, along with ok = true. If the language does not exist, an empty highlight.Language is returned in lang, and ok = false. If the language you want isn't built in, you can contribute it or add your own using highlight.NewLanguage.
lang, ok := languages.Get("go")
if !ok {
lang = tsh.NewLanguage(...)
}
Types ¶
This section is empty.
Source Files
¶
- languages.go
Click to show internal directories.
Click to hide internal directories.