1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-03-17 20:58:08 +02:00

Allow for /usr/bin/env shebangs (#71)

This commit is contained in:
Trevor Joynson 2017-10-22 16:45:29 -07:00 committed by Alec Thomas
parent 03b0c0d6bb
commit 972d70075c

View File

@ -6,7 +6,7 @@ import (
. "github.com/alecthomas/chroma" // nolint
)
var bashAnalyserRe = regexp.MustCompile(`(?m)^#!.*/bin/(?:bash|zsh|sh|ksh)`)
var bashAnalyserRe = regexp.MustCompile(`(?m)^#!.*/bin/(?:env |)(?:bash|zsh|sh|ksh)`)
// Bash lexer.
var Bash = Register(MustNewLexer(