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 (
)
// TableGen lexer.
var Tablegen = internal.Register(MustNewLexer(
var Tablegen = internal.Register(MustNewLazyLexer(
&Config{
Name: "TableGen",
Aliases: []string{"tablegen"},
Filenames: []string{"*.td"},
MimeTypes: []string{"text/x-tablegen"},
},
Rules{
tablegenRules,
))
func tablegenRules() Rules {
return Rules{
"root": {
Include("macro"),
Include("whitespace"),
@ -38,5 +42,5 @@ var Tablegen = internal.Register(MustNewLexer(
"keyword": {
{Words(``, `\b`, `bit`, `bits`, `class`, `code`, `dag`, `def`, `defm`, `field`, `foreach`, `in`, `int`, `let`, `list`, `multiclass`, `string`), Keyword, nil},
},
},
))
}
}

View file

@ -6,7 +6,7 @@ import (
)
// Tasm lexer.
var Tasm = internal.Register(MustNewLexer(
var Tasm = internal.Register(MustNewLazyLexer(
&Config{
Name: "TASM",
Aliases: []string{"tasm"},
@ -14,7 +14,11 @@ var Tasm = internal.Register(MustNewLexer(
MimeTypes: []string{"text/x-tasm"},
CaseInsensitive: true,
},
Rules{
tasmRules,
))
func tasmRules() Rules {
return Rules{
"root": {
{`^\s*%`, CommentPreproc, Push("preproc")},
Include("whitespace"),
@ -57,5 +61,5 @@ var Tasm = internal.Register(MustNewLexer(
{`seg|wrt|strict`, OperatorWord, nil},
{`byte|[dq]?word`, KeywordType, nil},
},
},
))
}
}

View file

@ -6,14 +6,18 @@ import (
)
// Tcl lexer.
var Tcl = internal.Register(MustNewLexer(
var Tcl = internal.Register(MustNewLazyLexer(
&Config{
Name: "Tcl",
Aliases: []string{"tcl"},
Filenames: []string{"*.tcl", "*.rvt"},
MimeTypes: []string{"text/x-tcl", "text/x-script.tcl", "application/x-tcl"},
},
Rules{
tclRules,
))
func tclRules() Rules {
return Rules{
"root": {
Include("command"),
Include("basic"),
@ -112,5 +116,5 @@ var Tcl = internal.Register(MustNewLexer(
{`.*[^\\]\n`, Comment, Pop(1)},
{`.*\\\n`, Comment, nil},
},
},
))
}
}

View file

@ -6,14 +6,18 @@ import (
)
// Tcsh lexer.
var Tcsh = internal.Register(MustNewLexer(
var Tcsh = internal.Register(MustNewLazyLexer(
&Config{
Name: "Tcsh",
Aliases: []string{"tcsh", "csh"},
Filenames: []string{"*.tcsh", "*.csh"},
MimeTypes: []string{"application/x-csh"},
},
Rules{
tcshRules,
))
func tcshRules() Rules {
return Rules{
"root": {
Include("basic"),
{`\$\(`, Keyword, Push("paren")},
@ -55,5 +59,5 @@ var Tcsh = internal.Register(MustNewLexer(
{"`", LiteralStringBacktick, Pop(1)},
Include("root"),
},
},
))
}
}

View file

@ -6,14 +6,18 @@ import (
)
// Termcap lexer.
var Termcap = internal.Register(MustNewLexer(
var Termcap = internal.Register(MustNewLazyLexer(
&Config{
Name: "Termcap",
Aliases: []string{"termcap"},
Filenames: []string{"termcap", "termcap.src"},
MimeTypes: []string{},
},
Rules{
termcapRules,
))
func termcapRules() Rules {
return Rules{
"root": {
{`^#.*$`, Comment, nil},
{`^[^\s#:|]+`, NameTag, Push("names")},
@ -38,5 +42,5 @@ var Termcap = internal.Register(MustNewLexer(
{`[^:\\]+`, Literal, nil},
{`.`, Literal, nil},
},
},
))
}
}

View file

@ -6,14 +6,18 @@ import (
)
// Terminfo lexer.
var Terminfo = internal.Register(MustNewLexer(
var Terminfo = internal.Register(MustNewLazyLexer(
&Config{
Name: "Terminfo",
Aliases: []string{"terminfo"},
Filenames: []string{"terminfo", "terminfo.src"},
MimeTypes: []string{},
},
Rules{
terminfoRules,
))
func terminfoRules() Rules {
return Rules{
"root": {
{`^#.*$`, Comment, nil},
{`^[^\s#,|]+`, NameTag, Push("names")},
@ -38,5 +42,5 @@ var Terminfo = internal.Register(MustNewLexer(
{`[^\\,]+`, Literal, nil},
{`.`, Literal, nil},
},
},
))
}
}

View file

@ -6,14 +6,18 @@ import (
)
// Terraform lexer.
var Terraform = internal.Register(MustNewLexer(
var Terraform = internal.Register(MustNewLazyLexer(
&Config{
Name: "Terraform",
Aliases: []string{"terraform", "tf"},
Filenames: []string{"*.tf"},
MimeTypes: []string{"application/x-tf", "application/x-terraform"},
},
Rules{
terraformRules,
))
func terraformRules() Rules {
return Rules{
"root": {
{`[\[\](),.{}]`, Punctuation, nil},
{`-?[0-9]+`, LiteralNumber, nil},
@ -56,5 +60,5 @@ var Terraform = internal.Register(MustNewLexer(
{`\}`, LiteralStringInterpol, Pop(1)},
Include("root"),
},
},
))
}
}

View file

@ -6,14 +6,18 @@ import (
)
// Tex lexer.
var TeX = internal.Register(MustNewLexer(
var TeX = internal.Register(MustNewLazyLexer(
&Config{
Name: "TeX",
Aliases: []string{"tex", "latex"},
Filenames: []string{"*.tex", "*.aux", "*.toc"},
MimeTypes: []string{"text/x-tex", "text/x-latex"},
},
Rules{
texRules,
))
func texRules() Rules {
return Rules{
"general": {
{`%.*?\n`, Comment, nil},
{`[{}]`, NameBuiltin, nil},
@ -52,5 +56,5 @@ var TeX = internal.Register(MustNewLexer(
{`\*`, Keyword, nil},
Default(Pop(1)),
},
},
))
}
}

View file

@ -6,14 +6,18 @@ import (
)
// Thrift lexer.
var Thrift = internal.Register(MustNewLexer(
var Thrift = internal.Register(MustNewLazyLexer(
&Config{
Name: "Thrift",
Aliases: []string{"thrift"},
Filenames: []string{"*.thrift"},
MimeTypes: []string{"application/x-thrift"},
},
Rules{
thriftRules,
))
func thriftRules() Rules {
return Rules{
"root": {
Include("whitespace"),
Include("comments"),
@ -69,5 +73,5 @@ var Thrift = internal.Register(MustNewLexer(
{`[+-]?0x[0-9A-Fa-f]+`, LiteralNumberHex, nil},
{`[+-]?[0-9]+`, LiteralNumberInteger, nil},
},
},
))
}
}

View file

@ -5,14 +5,18 @@ import (
"github.com/alecthomas/chroma/lexers/internal"
)
var TOML = internal.Register(MustNewLexer(
var TOML = internal.Register(MustNewLazyLexer(
&Config{
Name: "TOML",
Aliases: []string{"toml"},
Filenames: []string{"*.toml"},
MimeTypes: []string{"text/x-toml"},
},
Rules{
tomlRules,
))
func tomlRules() Rules {
return Rules{
"root": {
{`\s+`, Text, nil},
{`#.*`, Comment, nil},
@ -25,5 +29,5 @@ var TOML = internal.Register(MustNewLexer(
{`[.,=\[\]{}]`, Punctuation, nil},
{`[^\W\d]\w*`, NameOther, nil},
},
},
))
}
}

View file

@ -6,7 +6,7 @@ import (
)
// TradingView lexer
var TradingView = internal.Register(MustNewLexer(
var TradingView = internal.Register(MustNewLazyLexer(
&Config{
Name: "TradingView",
Aliases: []string{"tradingview", "tv"},
@ -15,7 +15,11 @@ var TradingView = internal.Register(MustNewLexer(
DotAll: true,
EnsureNL: true,
},
Rules{
tradingViewRules,
))
func tradingViewRules() Rules {
return Rules{
"root": {
{`[^\S\n]+|\n|[()]`, Text, nil},
{`(//.*?)(\n)`, ByGroups(CommentSingle, Text), nil},
@ -36,5 +40,5 @@ var TradingView = internal.Register(MustNewLexer(
{`(and|or|not|if|else|for|to)\b`, OperatorWord, nil},
{`@?[_a-zA-Z]\w*`, Text, nil},
},
},
))
}
}

View file

@ -6,7 +6,7 @@ import (
)
// TransactSQL lexer.
var TransactSQL = internal.Register(MustNewLexer(
var TransactSQL = internal.Register(MustNewLazyLexer(
&Config{
Name: "Transact-SQL",
Aliases: []string{"tsql", "t-sql"},
@ -14,7 +14,11 @@ var TransactSQL = internal.Register(MustNewLexer(
NotMultiline: true,
CaseInsensitive: true,
},
Rules{
transactSQLRules,
))
func transactSQLRules() Rules {
return Rules{
"root": {
{`\s+`, TextWhitespace, nil},
{`--(?m).*?$\n?`, CommentSingle, nil},
@ -56,5 +60,5 @@ var TransactSQL = internal.Register(MustNewLexer(
{`""`, LiteralStringName, nil},
{`"`, LiteralStringName, Pop(1)},
},
},
))
}
}

View file

@ -6,14 +6,18 @@ import (
)
// Turing lexer.
var Turing = internal.Register(MustNewLexer(
var Turing = internal.Register(MustNewLazyLexer(
&Config{
Name: "Turing",
Aliases: []string{"turing"},
Filenames: []string{"*.turing", "*.tu"},
MimeTypes: []string{"text/x-turing"},
},
Rules{
turingRules,
))
func turingRules() Rules {
return Rules{
"root": {
{`\n`, Text, nil},
{`\s+`, Text, nil},
@ -39,5 +43,5 @@ var Turing = internal.Register(MustNewLexer(
{`[()\[\]{}.,:]`, Punctuation, nil},
{`[^\W\d]\w*`, NameOther, nil},
},
},
))
}
}

View file

@ -6,7 +6,7 @@ import (
)
// Turtle lexer.
var Turtle = internal.Register(MustNewLexer(
var Turtle = internal.Register(MustNewLazyLexer(
&Config{
Name: "Turtle",
Aliases: []string{"turtle"},
@ -15,7 +15,11 @@ var Turtle = internal.Register(MustNewLexer(
NotMultiline: true,
CaseInsensitive: true,
},
Rules{
turtleRules,
))
func turtleRules() Rules {
return Rules{
"root": {
{`\s+`, TextWhitespace, nil},
{"(@base|BASE)(\\s+)(<[^<>\"{}|^`\\\\\\x00-\\x20]*>)(\\s*)(\\.?)", ByGroups(Keyword, TextWhitespace, NameVariable, TextWhitespace, Punctuation), nil},
@ -63,5 +67,5 @@ var Turtle = internal.Register(MustNewLexer(
{`(\^\^)((?:[a-z][\w-]*)?\:)([a-z][\w-]*)`, ByGroups(Operator, GenericEmph, GenericEmph), Pop(2)},
Default(Pop(2)),
},
},
))
}
}

View file

@ -6,7 +6,7 @@ import (
)
// Twig lexer.
var Twig = internal.Register(MustNewLexer(
var Twig = internal.Register(MustNewLazyLexer(
&Config{
Name: "Twig",
Aliases: []string{"twig"},
@ -14,7 +14,11 @@ var Twig = internal.Register(MustNewLexer(
MimeTypes: []string{"application/x-twig"},
DotAll: true,
},
Rules{
twigRules,
))
func twigRules() Rules {
return Rules{
"root": {
{`[^{]+`, Other, nil},
{`\{\{`, CommentPreproc, Push("var")},
@ -50,5 +54,5 @@ var Twig = internal.Register(MustNewLexer(
Include("varnames"),
{`.`, Punctuation, nil},
},
},
))
}
}

View file

@ -6,7 +6,7 @@ import (
)
// TypeScript lexer.
var TypeScript = internal.Register(MustNewLexer(
var TypeScript = internal.Register(MustNewLazyLexer(
&Config{
Name: "TypeScript",
Aliases: []string{"ts", "tsx", "typescript"},
@ -15,7 +15,11 @@ var TypeScript = internal.Register(MustNewLexer(
DotAll: true,
EnsureNL: true,
},
Rules{
typeScriptRules,
))
func typeScriptRules() Rules {
return Rules{
"commentsandwhitespace": {
{`\s+`, Text, nil},
{`<!--`, Comment, nil},
@ -93,5 +97,5 @@ var TypeScript = internal.Register(MustNewLexer(
{`}`, Punctuation, Pop(1)},
Include("root"),
},
},
))
}
}

View file

@ -6,7 +6,7 @@ import (
)
// Typoscript lexer.
var Typoscript = internal.Register(MustNewLexer(
var Typoscript = internal.Register(MustNewLazyLexer(
&Config{
Name: "TypoScript",
Aliases: []string{"typoscript"},
@ -15,7 +15,11 @@ var Typoscript = internal.Register(MustNewLexer(
DotAll: true,
Priority: 0.1,
},
Rules{
typoscriptRules,
))
func typoscriptRules() Rules {
return Rules{
"root": {
Include("comment"),
Include("constant"),
@ -78,18 +82,22 @@ var Typoscript = internal.Register(MustNewLexer(
"other": {
{`[\w"\-!/&;]+`, Text, nil},
},
},
))
}
}
// TypoScriptCSSData lexer.
var TypoScriptCSSData = internal.Register(MustNewLexer(
var TypoScriptCSSData = internal.Register(MustNewLazyLexer(
&Config{
Name: "TypoScriptCssData",
Aliases: []string{"typoscriptcssdata"},
Filenames: []string{},
MimeTypes: []string{},
},
Rules{
typoScriptCSSDataRules,
))
func typoScriptCSSDataRules() Rules {
return Rules{
"root": {
{`(.*)(###\w+###)(.*)`, ByGroups(LiteralString, NameConstant, LiteralString), nil},
{`(\{)(\$)((?:[\w\-]+\.)*)([\w\-]+)(\})`, ByGroups(LiteralStringSymbol, Operator, NameConstant, NameConstant, LiteralStringSymbol), nil},
@ -100,18 +108,22 @@ var TypoScriptCSSData = internal.Register(MustNewLexer(
{`[<>,:=.*%+|]`, LiteralString, nil},
{`[\w"\-!/&;(){}]+`, LiteralString, nil},
},
},
))
}
}
// TypoScriptHTMLData lexer.
var TypoScriptHTMLData = internal.Register(MustNewLexer(
var TypoScriptHTMLData = internal.Register(MustNewLazyLexer(
&Config{
Name: "TypoScriptHtmlData",
Aliases: []string{"typoscripthtmldata"},
Filenames: []string{},
MimeTypes: []string{},
},
Rules{
typoScriptHTMLDataRules,
))
func typoScriptHTMLDataRules() Rules {
return Rules{
"root": {
{`(INCLUDE_TYPOSCRIPT)`, NameClass, nil},
{`(EXT|FILE|LLL):[^}\n"]*`, LiteralString, nil},
@ -122,5 +134,5 @@ var TypoScriptHTMLData = internal.Register(MustNewLexer(
{`[<>,:=.*%+|]`, LiteralString, nil},
{`[\w"\-!/&;(){}#]+`, LiteralString, nil},
},
},
))
}
}