forked from forgejo/forgejo
Vendor Update (#16121)
* update github.com/PuerkitoBio/goquery * update github.com/alecthomas/chroma * update github.com/blevesearch/bleve/v2 * update github.com/caddyserver/certmagic * update github.com/go-enry/go-enry/v2 * update github.com/go-git/go-billy/v5 * update github.com/go-git/go-git/v5 * update github.com/go-redis/redis/v8 * update github.com/go-testfixtures/testfixtures/v3 * update github.com/jaytaylor/html2text * update github.com/json-iterator/go * update github.com/klauspost/compress * update github.com/markbates/goth * update github.com/mattn/go-isatty * update github.com/mholt/archiver/v3 * update github.com/microcosm-cc/bluemonday * update github.com/minio/minio-go/v7 * update github.com/prometheus/client_golang * update github.com/unrolled/render * update github.com/xanzy/go-gitlab * update github.com/yuin/goldmark * update github.com/yuin/goldmark-highlighting Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
f088dc4ea1
commit
86e2789960
819 changed files with 38072 additions and 34969 deletions
116
vendor/github.com/alecthomas/chroma/lexers/g/genshi.go
generated
vendored
116
vendor/github.com/alecthomas/chroma/lexers/g/genshi.go
generated
vendored
|
@ -7,14 +7,18 @@ import (
|
|||
)
|
||||
|
||||
// Genshi Text lexer.
|
||||
var GenshiText = internal.Register(MustNewLexer(
|
||||
var GenshiText = internal.Register(MustNewLazyLexer(
|
||||
&Config{
|
||||
Name: "Genshi Text",
|
||||
Aliases: []string{"genshitext"},
|
||||
Filenames: []string{},
|
||||
MimeTypes: []string{"application/x-genshi-text", "text/x-genshi"},
|
||||
},
|
||||
Rules{
|
||||
genshiTextRules,
|
||||
))
|
||||
|
||||
func genshiTextRules() Rules {
|
||||
return Rules{
|
||||
"root": {
|
||||
{`[^#$\s]+`, Other, nil},
|
||||
{`^(\s*)(##.*)$`, ByGroups(Text, Comment), nil},
|
||||
|
@ -33,11 +37,11 @@ var GenshiText = internal.Register(MustNewLexer(
|
|||
{`(?<!\$)(\$\{)(.+?)(\})`, ByGroups(CommentPreproc, Using(Python), CommentPreproc), nil},
|
||||
{`(?<!\$)(\$)([a-zA-Z_][\w.]*)`, NameVariable, nil},
|
||||
},
|
||||
},
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
// Html+Genshi lexer.
|
||||
var GenshiHTMLTemplate = internal.Register(MustNewLexer(
|
||||
var GenshiHTMLTemplate = internal.Register(MustNewLazyLexer(
|
||||
&Config{
|
||||
Name: "Genshi HTML",
|
||||
Aliases: []string{"html+genshi", "html+kid"},
|
||||
|
@ -50,7 +54,7 @@ var GenshiHTMLTemplate = internal.Register(MustNewLexer(
|
|||
))
|
||||
|
||||
// Genshi lexer.
|
||||
var Genshi = internal.Register(MustNewLexer(
|
||||
var Genshi = internal.Register(MustNewLazyLexer(
|
||||
&Config{
|
||||
Name: "Genshi",
|
||||
Aliases: []string{"genshi", "kid", "xml+genshi", "xml+kid"},
|
||||
|
@ -62,53 +66,55 @@ var Genshi = internal.Register(MustNewLexer(
|
|||
genshiMarkupRules,
|
||||
))
|
||||
|
||||
var genshiMarkupRules = Rules{
|
||||
"root": {
|
||||
{`[^<$]+`, Other, nil},
|
||||
{`(<\?python)(.*?)(\?>)`, ByGroups(CommentPreproc, Using(Python), CommentPreproc), nil},
|
||||
{`<\s*(script|style)\s*.*?>.*?<\s*/\1\s*>`, Other, nil},
|
||||
{`<\s*py:[a-zA-Z0-9]+`, NameTag, Push("pytag")},
|
||||
{`<\s*[a-zA-Z0-9:.]+`, NameTag, Push("tag")},
|
||||
Include("variable"),
|
||||
{`[<$]`, Other, nil},
|
||||
},
|
||||
"pytag": {
|
||||
{`\s+`, Text, nil},
|
||||
{`[\w:-]+\s*=`, NameAttribute, Push("pyattr")},
|
||||
{`/?\s*>`, NameTag, Pop(1)},
|
||||
},
|
||||
"pyattr": {
|
||||
{`(")(.*?)(")`, ByGroups(LiteralString, Using(Python), LiteralString), Pop(1)},
|
||||
{`(')(.*?)(')`, ByGroups(LiteralString, Using(Python), LiteralString), Pop(1)},
|
||||
{`[^\s>]+`, LiteralString, Pop(1)},
|
||||
},
|
||||
"tag": {
|
||||
{`\s+`, Text, nil},
|
||||
{`py:[\w-]+\s*=`, NameAttribute, Push("pyattr")},
|
||||
{`[\w:-]+\s*=`, NameAttribute, Push("attr")},
|
||||
{`/?\s*>`, NameTag, Pop(1)},
|
||||
},
|
||||
"attr": {
|
||||
{`"`, LiteralString, Push("attr-dstring")},
|
||||
{`'`, LiteralString, Push("attr-sstring")},
|
||||
{`[^\s>]*`, LiteralString, Pop(1)},
|
||||
},
|
||||
"attr-dstring": {
|
||||
{`"`, LiteralString, Pop(1)},
|
||||
Include("strings"),
|
||||
{`'`, LiteralString, nil},
|
||||
},
|
||||
"attr-sstring": {
|
||||
{`'`, LiteralString, Pop(1)},
|
||||
Include("strings"),
|
||||
{`'`, LiteralString, nil},
|
||||
},
|
||||
"strings": {
|
||||
{`[^"'$]+`, LiteralString, nil},
|
||||
Include("variable"),
|
||||
},
|
||||
"variable": {
|
||||
{`(?<!\$)(\$\{)(.+?)(\})`, ByGroups(CommentPreproc, Using(Python), CommentPreproc), nil},
|
||||
{`(?<!\$)(\$)([a-zA-Z_][\w\.]*)`, NameVariable, nil},
|
||||
},
|
||||
func genshiMarkupRules() Rules {
|
||||
return Rules{
|
||||
"root": {
|
||||
{`[^<$]+`, Other, nil},
|
||||
{`(<\?python)(.*?)(\?>)`, ByGroups(CommentPreproc, Using(Python), CommentPreproc), nil},
|
||||
{`<\s*(script|style)\s*.*?>.*?<\s*/\1\s*>`, Other, nil},
|
||||
{`<\s*py:[a-zA-Z0-9]+`, NameTag, Push("pytag")},
|
||||
{`<\s*[a-zA-Z0-9:.]+`, NameTag, Push("tag")},
|
||||
Include("variable"),
|
||||
{`[<$]`, Other, nil},
|
||||
},
|
||||
"pytag": {
|
||||
{`\s+`, Text, nil},
|
||||
{`[\w:-]+\s*=`, NameAttribute, Push("pyattr")},
|
||||
{`/?\s*>`, NameTag, Pop(1)},
|
||||
},
|
||||
"pyattr": {
|
||||
{`(")(.*?)(")`, ByGroups(LiteralString, Using(Python), LiteralString), Pop(1)},
|
||||
{`(')(.*?)(')`, ByGroups(LiteralString, Using(Python), LiteralString), Pop(1)},
|
||||
{`[^\s>]+`, LiteralString, Pop(1)},
|
||||
},
|
||||
"tag": {
|
||||
{`\s+`, Text, nil},
|
||||
{`py:[\w-]+\s*=`, NameAttribute, Push("pyattr")},
|
||||
{`[\w:-]+\s*=`, NameAttribute, Push("attr")},
|
||||
{`/?\s*>`, NameTag, Pop(1)},
|
||||
},
|
||||
"attr": {
|
||||
{`"`, LiteralString, Push("attr-dstring")},
|
||||
{`'`, LiteralString, Push("attr-sstring")},
|
||||
{`[^\s>]*`, LiteralString, Pop(1)},
|
||||
},
|
||||
"attr-dstring": {
|
||||
{`"`, LiteralString, Pop(1)},
|
||||
Include("strings"),
|
||||
{`'`, LiteralString, nil},
|
||||
},
|
||||
"attr-sstring": {
|
||||
{`'`, LiteralString, Pop(1)},
|
||||
Include("strings"),
|
||||
{`'`, LiteralString, nil},
|
||||
},
|
||||
"strings": {
|
||||
{`[^"'$]+`, LiteralString, nil},
|
||||
Include("variable"),
|
||||
},
|
||||
"variable": {
|
||||
{`(?<!\$)(\$\{)(.+?)(\})`, ByGroups(CommentPreproc, Using(Python), CommentPreproc), nil},
|
||||
{`(?<!\$)(\$)([a-zA-Z_][\w\.]*)`, NameVariable, nil},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue