forked from forgejo/forgejo
Update chroma (#18033)
Update chroma to 0.9.4 Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
parent
fb5f7791ef
commit
25677cdc5b
36 changed files with 937 additions and 683 deletions
7
vendor/github.com/alecthomas/chroma/regexp.go
generated
vendored
7
vendor/github.com/alecthomas/chroma/regexp.go
generated
vendored
|
@ -3,6 +3,7 @@ package chroma
|
|||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"sort"
|
||||
"strings"
|
||||
|
@ -238,6 +239,12 @@ func NewLazyLexer(config *Config, rulesFunc func() Rules) (*RegexLexer, error) {
|
|||
if config == nil {
|
||||
config = &Config{}
|
||||
}
|
||||
for _, glob := range append(config.Filenames, config.AliasFilenames...) {
|
||||
_, err := filepath.Match(glob, "")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("%s: %q is not a valid glob: %w", config.Name, glob, err)
|
||||
}
|
||||
}
|
||||
return &RegexLexer{
|
||||
config: config,
|
||||
compilerFunc: rulesFunc,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue