1
0
Fork 0
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:
6543 2021-06-10 16:44:25 +02:00 committed by GitHub
parent f088dc4ea1
commit 86e2789960
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
819 changed files with 38072 additions and 34969 deletions

View file

@ -6,14 +6,18 @@ import (
)
// Pacmanconf lexer.
var Pacmanconf = internal.Register(MustNewLexer(
var Pacmanconf = internal.Register(MustNewLazyLexer(
&Config{
Name: "PacmanConf",
Aliases: []string{"pacmanconf"},
Filenames: []string{"pacman.conf"},
MimeTypes: []string{},
},
Rules{
pacmanconfRules,
))
func pacmanconfRules() Rules {
return Rules{
"root": {
{`#.*$`, CommentSingle, nil},
{`^\s*\[.*?\]\s*$`, Keyword, nil},
@ -22,5 +26,5 @@ var Pacmanconf = internal.Register(MustNewLexer(
{Words(``, `\b`, `$repo`, `$arch`, `%o`, `%u`), NameVariable, nil},
{`.`, Text, nil},
},
},
))
}
}

View file

@ -6,7 +6,7 @@ import (
)
// Perl lexer.
var Perl = internal.Register(MustNewLexer(
var Perl = internal.Register(MustNewLazyLexer(
&Config{
Name: "Perl",
Aliases: []string{"perl", "pl"},
@ -14,7 +14,11 @@ var Perl = internal.Register(MustNewLexer(
MimeTypes: []string{"text/x-perl", "application/x-perl"},
DotAll: true,
},
Rules{
perlRules,
))
func perlRules() Rules {
return Rules{
"balanced-regex": {
{`/(\\\\|\\[^\\]|[^\\/])*/[egimosx]*`, LiteralStringRegex, Pop(1)},
{`!(\\\\|\\[^\\]|[^\\!])*![egimosx]*`, LiteralStringRegex, Pop(1)},
@ -134,5 +138,5 @@ var Perl = internal.Register(MustNewLexer(
"end-part": {
{`.+`, CommentPreproc, Pop(1)},
},
},
))
}
}

View file

@ -6,7 +6,7 @@ import (
)
// Pig lexer.
var Pig = internal.Register(MustNewLexer(
var Pig = internal.Register(MustNewLazyLexer(
&Config{
Name: "Pig",
Aliases: []string{"pig"},
@ -14,7 +14,11 @@ var Pig = internal.Register(MustNewLexer(
MimeTypes: []string{"text/x-pig"},
CaseInsensitive: true,
},
Rules{
pigRules,
))
func pigRules() Rules {
return Rules{
"root": {
{`\s+`, Text, nil},
{`--.*`, Comment, nil},
@ -53,5 +57,5 @@ var Pig = internal.Register(MustNewLexer(
{`(eq|gt|lt|gte|lte|neq|matches)\b`, Operator, nil},
{`(==|<=|<|>=|>|!=)`, Operator, nil},
},
},
))
}
}

View file

@ -6,14 +6,18 @@ import (
)
// Pkgconfig lexer.
var Pkgconfig = internal.Register(MustNewLexer(
var Pkgconfig = internal.Register(MustNewLazyLexer(
&Config{
Name: "PkgConfig",
Aliases: []string{"pkgconfig"},
Filenames: []string{"*.pc"},
MimeTypes: []string{},
},
Rules{
pkgconfigRules,
))
func pkgconfigRules() Rules {
return Rules{
"root": {
{`#.*$`, CommentSingle, nil},
{`^(\w+)(=)`, ByGroups(NameAttribute, Operator), nil},
@ -37,5 +41,5 @@ var Pkgconfig = internal.Register(MustNewLexer(
{`[^${}#\n]+`, Text, nil},
{`.`, Text, nil},
},
},
))
}
}

View file

@ -5,7 +5,7 @@ import (
"github.com/alecthomas/chroma/lexers/internal"
)
var Plaintext = internal.Register(MustNewLexer(
var Plaintext = internal.Register(MustNewLazyLexer(
&Config{
Name: "plaintext",
Aliases: []string{"text", "plain", "no-highlight"},

View file

@ -6,7 +6,7 @@ import (
)
// Pl/Pgsql lexer.
var PLpgSQL = internal.Register(MustNewLexer(
var PLpgSQL = internal.Register(MustNewLazyLexer(
&Config{
Name: "PL/pgSQL",
Aliases: []string{"plpgsql"},
@ -15,13 +15,17 @@ var PLpgSQL = internal.Register(MustNewLexer(
NotMultiline: true,
CaseInsensitive: true,
},
Rules{
plpgSQLRules,
))
func plpgSQLRules() Rules {
return Rules{
"root": {
{`\%[a-z]\w*\b`, NameBuiltin, nil},
{`:=`, Operator, nil},
{`\<\<[a-z]\w*\>\>`, NameLabel, nil},
{`\#[a-z]\w*\b`, KeywordPseudo, nil},
{`\s+`, Text, nil},
{`\s+`, TextWhitespace, nil},
{`--.*\n?`, CommentSingle, nil},
{`/\*`, CommentMultiline, Push("multiline-comments")},
{`(bigint|bigserial|bit|bit\s+varying|bool|boolean|box|bytea|char|character|character\s+varying|cidr|circle|date|decimal|double\s+precision|float4|float8|inet|int|int2|int4|int8|integer|interval|json|jsonb|line|lseg|macaddr|money|numeric|path|pg_lsn|point|polygon|real|serial|serial2|serial4|serial8|smallint|smallserial|text|time|timestamp|timestamptz|timetz|tsquery|tsvector|txid_snapshot|uuid|varbit|varchar|with\s+time\s+zone|without\s+time\s+zone|xml|anyarray|anyelement|anyenum|anynonarray|anyrange|cstring|fdw_handler|internal|language_handler|opaque|record|void)\b`, NameBuiltin, nil},
@ -54,5 +58,5 @@ var PLpgSQL = internal.Register(MustNewLexer(
{`""`, LiteralStringName, nil},
{`"`, LiteralStringName, Pop(1)},
},
},
))
}
}

View file

@ -6,14 +6,18 @@ import (
)
// Pony lexer.
var Pony = internal.Register(MustNewLexer(
var Pony = internal.Register(MustNewLazyLexer(
&Config{
Name: "Pony",
Aliases: []string{"pony"},
Filenames: []string{"*.pony"},
MimeTypes: []string{},
},
Rules{
ponyRules,
))
func ponyRules() Rules {
return Rules{
"root": {
{`\n`, Text, nil},
{`[^\S\n]+`, Text, nil},
@ -55,5 +59,5 @@ var Pony = internal.Register(MustNewLexer(
{`\\"`, LiteralString, nil},
{`[^\\"]+`, LiteralString, nil},
},
},
))
}
}

View file

@ -6,7 +6,7 @@ import (
)
// Postgresql Sql Dialect lexer.
var PostgreSQL = internal.Register(MustNewLexer(
var PostgreSQL = internal.Register(MustNewLazyLexer(
&Config{
Name: "PostgreSQL SQL dialect",
Aliases: []string{"postgresql", "postgres"},
@ -15,13 +15,18 @@ var PostgreSQL = internal.Register(MustNewLexer(
NotMultiline: true,
CaseInsensitive: true,
},
Rules{
postgreSQLRules,
))
func postgreSQLRules() Rules {
return Rules{
"root": {
{`\s+`, Text, nil},
{`--.*\n?`, CommentSingle, nil},
{`/\*`, CommentMultiline, Push("multiline-comments")},
{`(bigint|bigserial|bit|bit\s+varying|bool|boolean|box|bytea|char|character|character\s+varying|cidr|circle|date|decimal|double\s+precision|float4|float8|inet|int|int2|int4|int8|integer|interval|json|jsonb|line|lseg|macaddr|money|numeric|path|pg_lsn|point|polygon|real|serial|serial2|serial4|serial8|smallint|smallserial|text|time|timestamp|timestamptz|timetz|tsquery|tsvector|txid_snapshot|uuid|varbit|varchar|with\s+time\s+zone|without\s+time\s+zone|xml|anyarray|anyelement|anyenum|anynonarray|anyrange|cstring|fdw_handler|internal|language_handler|opaque|record|void)\b`, NameBuiltin, nil},
{`(?s)(DO)(\s+)(?:(LANGUAGE)?(\s+)('?)(\w+)?('?)(\s+))?(\$)([^$]*)(\$)(.*?)(\$)(\10)(\$)`,
{
`(?s)(DO)(\s+)(?:(LANGUAGE)?(\s+)('?)(\w+)?('?)(\s+))?(\$)([^$]*)(\$)(.*?)(\$)(\10)(\$)`,
UsingByGroup(
internal.Get,
6, 12,
@ -41,7 +46,8 @@ var PostgreSQL = internal.Register(MustNewLexer(
{`[0-9]+`, LiteralNumberInteger, nil},
{`((?:E|U&)?)(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Push("string")},
{`((?:U&)?)(")`, ByGroups(LiteralStringAffix, LiteralStringName), Push("quoted-ident")},
{`(?s)(\$)([^$]*)(\$)(.*?)(\$)(\2)(\$)(\s+)(LANGUAGE)?(\s+)('?)(\w+)?('?)`,
{
`(?s)(\$)([^$]*)(\$)(.*?)(\$)(\2)(\$)(\s+)(LANGUAGE)?(\s+)('?)(\w+)?('?)`,
UsingByGroup(internal.Get,
12, 4,
StringHeredoc, StringHeredoc, StringHeredoc, // $tag$
@ -73,5 +79,5 @@ var PostgreSQL = internal.Register(MustNewLexer(
{`""`, LiteralStringName, nil},
{`"`, LiteralStringName, Pop(1)},
},
},
))
}
}

View file

@ -6,14 +6,18 @@ import (
)
// Postscript lexer.
var Postscript = internal.Register(MustNewLexer(
var Postscript = internal.Register(MustNewLazyLexer(
&Config{
Name: "PostScript",
Aliases: []string{"postscript", "postscr"},
Filenames: []string{"*.ps", "*.eps"},
MimeTypes: []string{"application/postscript"},
},
Rules{
postscriptRules,
))
func postscriptRules() Rules {
return Rules{
"root": {
{`^%!.+\n`, CommentPreproc, nil},
{`%%.*\n`, CommentSpecial, nil},
@ -42,5 +46,5 @@ var Postscript = internal.Register(MustNewLexer(
{`[0-8]{3}|n|r|t|b|f|\\|\(|\)`, LiteralStringEscape, Pop(1)},
Default(Pop(1)),
},
},
))
}
}

View file

@ -6,14 +6,18 @@ import (
)
// Povray lexer.
var Povray = internal.Register(MustNewLexer(
var Povray = internal.Register(MustNewLazyLexer(
&Config{
Name: "POVRay",
Aliases: []string{"pov"},
Filenames: []string{"*.pov", "*.inc"},
MimeTypes: []string{"text/x-povray"},
},
Rules{
povrayRules,
))
func povrayRules() Rules {
return Rules{
"root": {
{`/\*[\w\W]*?\*/`, CommentMultiline, nil},
{`//.*\n`, CommentSingle, nil},
@ -31,5 +35,5 @@ var Povray = internal.Register(MustNewLexer(
{`"(\\\\|\\"|[^"])*"`, LiteralString, nil},
{`\s+`, Text, nil},
},
},
))
}
}

View file

@ -6,16 +6,20 @@ import (
)
// Powershell lexer.
var Powershell = internal.Register(MustNewLexer(
var Powershell = internal.Register(MustNewLazyLexer(
&Config{
Name: "PowerShell",
Aliases: []string{"powershell", "posh", "ps1", "psm1"},
Filenames: []string{"*.ps1", "*.psm1"},
Aliases: []string{"powershell", "posh", "ps1", "psm1", "psd1"},
Filenames: []string{"*.ps1", "*.psm1", "*.psd1"},
MimeTypes: []string{"text/x-powershell"},
DotAll: true,
CaseInsensitive: true,
},
Rules{
powershellRules,
))
func powershellRules() Rules {
return Rules{
"root": {
{`\(`, Punctuation, Push("child")},
{`\s+`, Text, nil},
@ -29,9 +33,9 @@ var Powershell = internal.Register(MustNewLexer(
{`"`, LiteralStringDouble, Push("string")},
{`'([^']|'')*'`, LiteralStringSingle, nil},
{`(\$|@@|@)((global|script|private|env):)?\w+`, NameVariable, nil},
{`[a-z]\w*-[a-z]\w*\b`, NameBuiltin, nil},
{`(while|validateset|validaterange|validatepattern|validatelength|validatecount|until|trap|switch|return|ref|process|param|parameter|in|if|global:|function|foreach|for|finally|filter|end|elseif|else|dynamicparam|do|default|continue|cmdletbinding|break|begin|alias|\?|%|#script|#private|#local|#global|mandatory|parametersetname|position|valuefrompipeline|valuefrompipelinebypropertyname|valuefromremainingarguments|helpmessage|try|catch|throw)\b`, Keyword, nil},
{`-(and|as|band|bnot|bor|bxor|casesensitive|ccontains|ceq|cge|cgt|cle|clike|clt|cmatch|cne|cnotcontains|cnotlike|cnotmatch|contains|creplace|eq|exact|f|file|ge|gt|icontains|ieq|ige|igt|ile|ilike|ilt|imatch|ine|inotcontains|inotlike|inotmatch|ireplace|is|isnot|le|like|lt|match|ne|not|notcontains|notlike|notmatch|or|regex|replace|wildcard)\b`, Operator, nil},
{`(write|where|watch|wait|use|update|unregister|unpublish|unprotect|unlock|uninstall|undo|unblock|trace|test|tee|take|sync|switch|suspend|submit|stop|step|start|split|sort|skip|show|set|send|select|search|scroll|save|revoke|resume|restore|restart|resolve|resize|reset|request|repair|rename|remove|register|redo|receive|read|push|publish|protect|pop|ping|out|optimize|open|new|move|mount|merge|measure|lock|limit|join|invoke|install|initialize|import|hide|group|grant|get|format|foreach|find|export|expand|exit|enter|enable|edit|dismount|disconnect|disable|deny|debug|cxnew|copy|convertto|convertfrom|convert|connect|confirm|compress|complete|compare|close|clear|checkpoint|block|backup|assert|approve|aggregate|add)-[a-z_]\w*\b`, NameBuiltin, nil},
{`(ac|asnp|cat|cd|cfs|chdir|clc|clear|clhy|cli|clp|cls|clv|cnsn|compare|copy|cp|cpi|cpp|curl|cvpa|dbp|del|diff|dir|dnsn|ebp|echo|epal|epcsv|epsn|erase|etsn|exsn|fc|fhx|fl|foreach|ft|fw|gal|gbp|gc|gci|gcm|gcs|gdr|ghy|gi|gjb|gl|gm|gmo|gp|gps|gpv|group|gsn|gsnp|gsv|gu|gv|gwmi|h|history|icm|iex|ihy|ii|ipal|ipcsv|ipmo|ipsn|irm|ise|iwmi|iwr|kill|lp|ls|man|md|measure|mi|mount|move|mp|mv|nal|ndr|ni|nmo|npssc|nsn|nv|ogv|oh|popd|ps|pushd|pwd|r|rbp|rcjb|rcsn|rd|rdr|ren|ri|rjb|rm|rmdir|rmo|rni|rnp|rp|rsn|rsnp|rujb|rv|rvpa|rwmi|sajb|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spjb|spps|spsv|start|sujb|sv|swmi|tee|trcm|type|wget|where|wjb|write)\s`, NameBuiltin, nil},
{"\\[[a-z_\\[][\\w. `,\\[\\]]*\\]", NameConstant, nil},
{`-[a-z_]\w*`, Name, nil},
@ -62,5 +66,5 @@ var Powershell = internal.Register(MustNewLexer(
{`[^@\n]+"]`, LiteralStringHeredoc, nil},
{`.`, LiteralStringHeredoc, nil},
},
},
))
}
}

View file

@ -6,14 +6,18 @@ import (
)
// Prolog lexer.
var Prolog = internal.Register(MustNewLexer(
var Prolog = internal.Register(MustNewLazyLexer(
&Config{
Name: "Prolog",
Aliases: []string{"prolog"},
Filenames: []string{"*.ecl", "*.prolog", "*.pro", "*.pl"},
MimeTypes: []string{"text/x-prolog"},
},
Rules{
prologRules,
))
func prologRules() Rules {
return Rules{
"root": {
{`/\*`, CommentMultiline, Push("nested-comment")},
{`%.*`, CommentSingle, nil},
@ -46,5 +50,5 @@ var Prolog = internal.Register(MustNewLexer(
{`[^*/]+`, CommentMultiline, nil},
{`[*/]`, CommentMultiline, nil},
},
},
))
}
}

View file

@ -6,14 +6,18 @@ import (
)
// Promql lexer.
var Promql = internal.Register(MustNewLexer(
var Promql = internal.Register(MustNewLazyLexer(
&Config{
Name: "PromQL",
Aliases: []string{"promql"},
Filenames: []string{"*.promql"},
MimeTypes: []string{},
},
Rules{
promqlRules,
))
func promqlRules() Rules {
return Rules{
"root": {
{`\n`, TextWhitespace, nil},
{`\s+`, TextWhitespace, nil},
@ -40,7 +44,7 @@ var Promql = internal.Register(MustNewLexer(
{`\n`, TextWhitespace, nil},
{`\s+`, TextWhitespace, nil},
{`,`, Punctuation, nil},
{`([_a-zA-Z][a-zA-Z0-9_]*?)(\s*?)(=~|!=|=|~!)(\s*?)(")(.*?)(")`, ByGroups(NameLabel, TextWhitespace, Operator, TextWhitespace, Punctuation, LiteralString, Punctuation), nil},
{`([_a-zA-Z][a-zA-Z0-9_]*?)(\s*?)(=~|!=|=|!~)(\s*?)("|')(.*?)("|')`, ByGroups(NameLabel, TextWhitespace, Operator, TextWhitespace, Punctuation, LiteralString, Punctuation), nil},
},
"range": {
{`\]`, Punctuation, Pop(1)},
@ -51,5 +55,5 @@ var Promql = internal.Register(MustNewLexer(
{`\(`, Operator, Push()},
Default(Pop(1)),
},
},
))
}
}

View file

@ -6,14 +6,18 @@ import (
)
// ProtocolBuffer lexer.
var ProtocolBuffer = internal.Register(MustNewLexer(
var ProtocolBuffer = internal.Register(MustNewLazyLexer(
&Config{
Name: "Protocol Buffer",
Aliases: []string{"protobuf", "proto"},
Filenames: []string{"*.proto"},
MimeTypes: []string{},
},
Rules{
protocolBufferRules,
))
func protocolBufferRules() Rules {
return Rules{
"root": {
{`[ \t]+`, Text, nil},
{`[,;{}\[\]()<>]`, Punctuation, nil},
@ -49,5 +53,5 @@ var ProtocolBuffer = internal.Register(MustNewLexer(
{`[a-zA-Z_]\w*`, Name, Pop(1)},
Default(Pop(1)),
},
},
))
}
}

View file

@ -6,14 +6,18 @@ import (
)
// Puppet lexer.
var Puppet = internal.Register(MustNewLexer(
var Puppet = internal.Register(MustNewLazyLexer(
&Config{
Name: "Puppet",
Aliases: []string{"puppet"},
Filenames: []string{"*.pp"},
MimeTypes: []string{},
},
Rules{
puppetRules,
))
func puppetRules() Rules {
return Rules{
"root": {
Include("comments"),
Include("keywords"),
@ -52,5 +56,5 @@ var Puppet = internal.Register(MustNewLexer(
{`"([^"])*"`, LiteralString, nil},
{`'(\\'|[^'])*'`, LiteralString, nil},
},
},
))
}
}

View file

@ -6,14 +6,18 @@ import (
)
// Python lexer.
var Python = internal.Register(MustNewLexer(
var Python = internal.Register(MustNewLazyLexer(
&Config{
Name: "Python",
Aliases: []string{"python", "py", "sage"},
Filenames: []string{"*.py", "*.pyw", "*.sc", "SConstruct", "SConscript", "*.tac", "*.sage"},
MimeTypes: []string{"text/x-python", "application/x-python"},
},
Rules{
pythonRules,
))
func pythonRules() Rules {
return Rules{
"root": {
{`\n`, Text, nil},
{`^(\s*)([rRuUbB]{,2})("""(?:.|\n)*?""")`, ByGroups(Text, LiteralStringAffix, LiteralStringDoc), nil},
@ -65,9 +69,9 @@ var Python = internal.Register(MustNewLexer(
{`\d+[eE][+-]?[0-9]+j?`, LiteralNumberFloat, nil},
{`0[0-7]+j?`, LiteralNumberOct, nil},
{`0[bB][01]+`, LiteralNumberBin, nil},
{`0[xX][a-fA-F0-9]+`, LiteralNumberHex, nil},
{`0[xX][a-fA-F0-9_]+`, LiteralNumberHex, nil},
{`\d+L`, LiteralNumberIntegerLong, nil},
{`\d+j?`, LiteralNumberInteger, nil},
{`[\d_]+j?`, LiteralNumberInteger, nil},
},
"backtick": {
{"`.*?`", LiteralStringBacktick, nil},
@ -133,5 +137,5 @@ var Python = internal.Register(MustNewLexer(
Include("strings-single"),
{`\n`, LiteralStringSingle, nil},
},
},
))
}
}

File diff suppressed because one or more lines are too long