mirror of
https://github.com/cheat/cheat.git
synced 2026-05-07 18:13:50 +02:00
chore(deps): bump github.com/alecthomas/chroma/v2 from 2.23.1 to 2.24.1
Bumps [github.com/alecthomas/chroma/v2](https://github.com/alecthomas/chroma) from 2.23.1 to 2.24.1. - [Release notes](https://github.com/alecthomas/chroma/releases) - [Commits](https://github.com/alecthomas/chroma/compare/v2.23.1...v2.24.1) --- updated-dependencies: - dependency-name: github.com/alecthomas/chroma/v2 dependency-version: 2.24.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
6
vendor/github.com/alecthomas/chroma/v2/regexp.go
generated
vendored
6
vendor/github.com/alecthomas/chroma/v2/regexp.go
generated
vendored
@@ -308,6 +308,7 @@ type RegexLexer struct {
|
||||
rules map[string][]*CompiledRule
|
||||
fetchRulesFunc func() (Rules, error)
|
||||
compileOnce sync.Once
|
||||
compileError error
|
||||
}
|
||||
|
||||
func (r *RegexLexer) String() string {
|
||||
@@ -446,8 +447,11 @@ func (r *RegexLexer) needRules() error {
|
||||
var err error
|
||||
if r.fetchRulesFunc != nil {
|
||||
r.compileOnce.Do(func() {
|
||||
err = r.fetchRules()
|
||||
r.compileError = r.fetchRules()
|
||||
})
|
||||
if r.compileError != nil {
|
||||
return r.compileError
|
||||
}
|
||||
}
|
||||
if err := r.maybeCompile(); err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user