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,7 +6,7 @@ import (
)
// D lexer. https://dlang.org/spec/lex.html
var D = internal.Register(MustNewLexer(
var D = internal.Register(MustNewLazyLexer(
&Config{
Name: "D",
Aliases: []string{"d"},
@ -14,7 +14,11 @@ var D = internal.Register(MustNewLexer(
MimeTypes: []string{"text/x-d"},
EnsureNL: true,
},
Rules{
dRules,
))
func dRules() Rules {
return Rules{
"root": {
{`[^\S\n]+`, Text, nil},
@ -65,5 +69,5 @@ var D = internal.Register(MustNewLexer(
"import": {
{`[\w.]+\*?`, NameNamespace, Pop(1)},
},
},
))
}
}

View file

@ -6,7 +6,7 @@ import (
)
// Dart lexer.
var Dart = internal.Register(MustNewLexer(
var Dart = internal.Register(MustNewLazyLexer(
&Config{
Name: "Dart",
Aliases: []string{"dart"},
@ -14,7 +14,11 @@ var Dart = internal.Register(MustNewLexer(
MimeTypes: []string{"text/x-dart"},
DotAll: true,
},
Rules{
dartRules,
))
func dartRules() Rules {
return Rules{
"root": {
Include("string_literal"),
{`#!(.*?)$`, CommentPreproc, nil},
@ -87,5 +91,5 @@ var Dart = internal.Register(MustNewLexer(
Include("string_common"),
{`(\$|\')+`, LiteralStringSingle, nil},
},
},
))
}
}

View file

@ -6,7 +6,7 @@ import (
)
// Diff lexer.
var Diff = internal.Register(MustNewLexer(
var Diff = internal.Register(MustNewLazyLexer(
&Config{
Name: "Diff",
Aliases: []string{"diff", "udiff"},
@ -14,7 +14,11 @@ var Diff = internal.Register(MustNewLexer(
Filenames: []string{"*.diff", "*.patch"},
MimeTypes: []string{"text/x-diff", "text/x-patch"},
},
Rules{
diffRules,
))
func diffRules() Rules {
return Rules{
"root": {
{` .*\n`, Text, nil},
{`\+.*\n`, GenericInserted, nil},
@ -25,5 +29,5 @@ var Diff = internal.Register(MustNewLexer(
{`=.*\n`, GenericHeading, nil},
{`.*\n`, Text, nil},
},
},
))
}
}

View file

@ -6,7 +6,7 @@ import (
)
// Django/Jinja lexer.
var DjangoJinja = internal.Register(MustNewLexer(
var DjangoJinja = internal.Register(MustNewLazyLexer(
&Config{
Name: "Django/Jinja",
Aliases: []string{"django", "jinja"},
@ -14,7 +14,11 @@ var DjangoJinja = internal.Register(MustNewLexer(
MimeTypes: []string{"application/x-django-templating", "application/x-jinja"},
DotAll: true,
},
Rules{
djangoJinjaRules,
))
func djangoJinjaRules() Rules {
return Rules{
"root": {
{`[^{]+`, Other, nil},
{`\{\{`, CommentPreproc, Push("var")},
@ -49,5 +53,5 @@ var DjangoJinja = internal.Register(MustNewLexer(
Include("varnames"),
{`.`, Punctuation, nil},
},
},
))
}
}

View file

@ -8,7 +8,7 @@ import (
)
// Docker lexer.
var Docker = internal.Register(MustNewLexer(
var Docker = internal.Register(MustNewLazyLexer(
&Config{
Name: "Docker",
Aliases: []string{"docker", "dockerfile"},
@ -16,7 +16,11 @@ var Docker = internal.Register(MustNewLexer(
MimeTypes: []string{"text/x-dockerfile-config"},
CaseInsensitive: true,
},
Rules{
dockerRules,
))
func dockerRules() Rules {
return Rules{
"root": {
{`#.*`, Comment, nil},
{`(ONBUILD)((?:\s*\\?\s*))`, ByGroups(Keyword, Using(b.Bash)), nil},
@ -27,5 +31,5 @@ var Docker = internal.Register(MustNewLexer(
{`((?:RUN|CMD|ENTRYPOINT|ENV|ARG|LABEL|ADD|COPY))`, Keyword, nil},
{`(.*\\\n)*.+`, Using(b.Bash), nil},
},
},
))
}
}

View file

@ -6,7 +6,7 @@ import (
)
// Dtd lexer.
var Dtd = internal.Register(MustNewLexer(
var Dtd = internal.Register(MustNewLazyLexer(
&Config{
Name: "DTD",
Aliases: []string{"dtd"},
@ -14,7 +14,11 @@ var Dtd = internal.Register(MustNewLexer(
MimeTypes: []string{"application/xml-dtd"},
DotAll: true,
},
Rules{
dtdRules,
))
func dtdRules() Rules {
return Rules{
"root": {
Include("common"),
{`(<!ELEMENT)(\s+)(\S+)`, ByGroups(Keyword, Text, NameTag), Push("element")},
@ -65,5 +69,5 @@ var Dtd = internal.Register(MustNewLexer(
{`[^>\s|()?+*,]+`, NameAttribute, nil},
{`>`, Keyword, Pop(1)},
},
},
))
}
}

74
vendor/github.com/alecthomas/chroma/lexers/d/dylan.go generated vendored Normal file
View file

@ -0,0 +1,74 @@
package d
import (
. "github.com/alecthomas/chroma" // nolint
"github.com/alecthomas/chroma/lexers/internal"
)
// Dylan lexer.
var Dylan = internal.Register(MustNewLexer(
&Config{
Name: "Dylan",
Aliases: []string{"dylan"},
Filenames: []string{"*.dylan", "*.dyl", "*.intr"},
MimeTypes: []string{"text/x-dylan"},
CaseInsensitive: true,
},
Rules{
"root": {
{`\s+`, Whitespace, nil},
{`//.*?\n`, CommentSingle, nil},
{`([a-z0-9-]+:)([ \t]*)(.*(?:\n[ \t].+)*)`, ByGroups(NameAttribute, Whitespace, LiteralString), nil},
Default(Push("code")),
},
"code": {
{`\s+`, Whitespace, nil},
{`//.*?\n`, CommentSingle, nil},
{`/\*`, CommentMultiline, Push("comment")},
{`"`, LiteralString, Push("string")},
{`'(\\.|\\[0-7]{1,3}|\\x[a-f0-9]{1,2}|[^\\\'\n])'`, LiteralStringChar, nil},
{`#b[01]+`, LiteralNumberBin, nil},
{`#o[0-7]+`, LiteralNumberOct, nil},
{`[-+]?(\d*\.\d+([ed][-+]?\d+)?|\d+(\.\d*)?e[-+]?\d+)`, LiteralNumberFloat, nil},
{`[-+]?\d+`, LiteralNumberInteger, nil},
{`#x[0-9a-f]+`, LiteralNumberHex, nil},
{`(\?\\?)([\w!&*<>|^$%@+~?/=-]+)(:)(token|name|variable|expression|body|case-body|\*)`,
ByGroups(Operator, NameVariable, Operator, NameBuiltin), nil},
{`(\?)(:)(token|name|variable|expression|body|case-body|\*)`,
ByGroups(Operator, Operator, NameVariable), nil},
{`(\?\\?)([\w!&*<>|^$%@+~?/=-]+)`, ByGroups(Operator, NameVariable), nil},
{`(=>|::|#\(|#\[|##|\?\?|\?=|\?|[(){}\[\],.;])`, Punctuation, nil},
{`:=`, Operator, nil},
{`#[tf]`, Literal, nil},
{`#"`, LiteralStringSymbol, Push("symbol")},
{`#[a-z0-9-]+`, Keyword, nil},
{`#(all-keys|include|key|next|rest)`, Keyword, nil},
{`[\w!&*<>|^$%@+~?/=-]+:`, KeywordConstant, nil},
{`<[\w!&*<>|^$%@+~?/=-]+>`, NameClass, nil},
{`\*[\w!&*<>|^$%@+~?/=-]+\*`, NameVariableGlobal, nil},
{`\$[\w!&*<>|^$%@+~?/=-]+`, NameConstant, nil},
{`(let|method|function)([ \t]+)([\w!&*<>|^$%@+~?/=-]+)`, ByGroups(NameBuiltin, Whitespace, NameVariable), nil},
{`(error|signal|return|break)`, NameException, nil},
{`(\\?)([\w!&*<>|^$%@+~?/=-]+)`, ByGroups(Operator, Name), nil},
},
"comment": {
{`[^*/]`, CommentMultiline, nil},
{`/\*`, CommentMultiline, Push()},
{`\*/`, CommentMultiline, Pop(1)},
{`[*/]`, CommentMultiline, nil},
},
"symbol": {
{`"`, LiteralStringSymbol, Pop(1)},
{`[^\\"]+`, LiteralStringSymbol, nil},
},
"string": {
{`"`, LiteralString, Pop(1)},
{`\\([\\abfnrtv"\']|x[a-f0-9]{2,4}|[0-7]{1,3})`, LiteralStringEscape, nil},
{`[^\\"\n]+`, LiteralString, nil},
{`\\\n`, LiteralString, nil},
{`\\`, LiteralString, nil},
},
},
))