Update Dependencies (#390)
Co-authored-by: Norwin Roosen <git@nroo.de> Co-authored-by: Norwin <git@nroo.de> Reviewed-on: https://gitea.com/gitea/tea/pulls/390 Reviewed-by: 6543 <6543@obermui.de> Reviewed-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Norwin <noerw@noreply.gitea.io> Co-committed-by: Norwin <noerw@noreply.gitea.io>
This commit is contained in:
18
vendor/github.com/alecthomas/chroma/lexers/n/nix.go
generated
vendored
18
vendor/github.com/alecthomas/chroma/lexers/n/nix.go
generated
vendored
@@ -7,18 +7,22 @@ import (
|
||||
"github.com/alecthomas/chroma/lexers/internal"
|
||||
)
|
||||
|
||||
// nixb matches right boundary of a nix word. Use it instead of \b.
|
||||
const nixb = `(?![a-zA-Z0-9_'-])`
|
||||
|
||||
// Nix lexer.
|
||||
var Nix = internal.Register(MustNewLexer(
|
||||
var Nix = internal.Register(MustNewLazyLexer(
|
||||
&Config{
|
||||
Name: "Nix",
|
||||
Aliases: []string{"nixos", "nix"},
|
||||
Filenames: []string{"*.nix"},
|
||||
MimeTypes: []string{"text/x-nix"},
|
||||
},
|
||||
Rules{
|
||||
nixRules,
|
||||
))
|
||||
|
||||
func nixRules() Rules {
|
||||
// nixb matches right boundary of a nix word. Use it instead of \b.
|
||||
const nixb = `(?![a-zA-Z0-9_'-])`
|
||||
|
||||
return Rules{
|
||||
"root": {
|
||||
Include("keywords"),
|
||||
Include("builtins"),
|
||||
@@ -118,5 +122,5 @@ var Nix = internal.Register(MustNewLexer(
|
||||
"space": {
|
||||
{`[ \t\r\n]+`, Text, nil},
|
||||
},
|
||||
},
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user