Use vendored modules
Signed-off-by: Izuru Yakumo <yakumo.izuru@chaotic.ninja> git-svn-id: file:///srv/svn/repo/aya/trunk@67 cec141ff-132a-4243-88a5-ce187bd62f94
This commit is contained in:
17
vendor/github.com/alecthomas/chroma/v2/lexers/bash.go
generated
vendored
Normal file
17
vendor/github.com/alecthomas/chroma/v2/lexers/bash.go
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
package lexers
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
)
|
||||
|
||||
// TODO(moorereason): can this be factored away?
|
||||
var bashAnalyserRe = regexp.MustCompile(`(?m)^#!.*/bin/(?:env |)(?:bash|zsh|sh|ksh)`)
|
||||
|
||||
func init() { // nolint: gochecknoinits
|
||||
Get("bash").SetAnalyser(func(text string) float32 {
|
||||
if bashAnalyserRe.FindString(text) != "" {
|
||||
return 1.0
|
||||
}
|
||||
return 0.0
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user