1
0
mirror of https://github.com/taigrr/wtf synced 2026-04-01 05:28:48 -07:00

Update dependencies

This commit is contained in:
Chris Cummer
2018-08-19 14:33:19 -07:00
parent 7936b5f261
commit 099fa58b39
308 changed files with 35205 additions and 1075 deletions

37
vendor/github.com/alecthomas/chroma/styles/api.go generated vendored Normal file
View File

@@ -0,0 +1,37 @@
package styles
import (
"sort"
"github.com/alecthomas/chroma"
)
// Registry of Styles.
var Registry = map[string]*chroma.Style{}
// Fallback style. Reassign to change the default fallback style.
var Fallback = SwapOff
// Register a chroma.Style.
func Register(style *chroma.Style) *chroma.Style {
Registry[style.Name] = style
return style
}
// Names of all available styles.
func Names() []string {
out := []string{}
for name := range Registry {
out = append(out, name)
}
sort.Strings(out)
return out
}
// Get named style, or Fallback.
func Get(name string) *chroma.Style {
if style, ok := Registry[name]; ok {
return style
}
return Fallback
}