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 (
)
// R/S lexer.
var R = internal.Register(MustNewLexer(
var R = internal.Register(MustNewLazyLexer(
&Config{
Name: "R",
Aliases: []string{"splus", "s", "r"},
Filenames: []string{"*.S", "*.R", "*.r", ".Rhistory", ".Rprofile", ".Renviron"},
MimeTypes: []string{"text/S-plus", "text/S", "text/x-r-source", "text/x-r", "text/x-R", "text/x-r-history", "text/x-r-profile"},
},
Rules{
rRules,
))
func rRules() Rules {
return Rules{
"comments": {
{`#.*$`, CommentSingle, nil},
},
@ -62,5 +66,5 @@ var R = internal.Register(MustNewLexer(
"string_dquote": {
{`([^"\\]|\\.)*"`, LiteralString, Pop(1)},
},
},
))
}
}

View file

@ -6,14 +6,18 @@ import (
)
// Racket lexer.
var Racket = internal.Register(MustNewLexer(
var Racket = internal.Register(MustNewLazyLexer(
&Config{
Name: "Racket",
Aliases: []string{"racket", "rkt"},
Filenames: []string{"*.rkt", "*.rktd", "*.rktl"},
MimeTypes: []string{"text/x-racket", "application/x-racket"},
},
Rules{
racketRules,
))
func racketRules() Rules {
return Rules{
"root": {
{`[)\]}]`, Error, nil},
{`(?!\Z)`, Text, Push("unquoted-datum")},
@ -98,5 +102,5 @@ var Racket = internal.Register(MustNewLexer(
{`(?s)\\([0-7]{1,3}|x[\da-fA-F]{1,2}|u[\da-fA-F]{1,4}|U[\da-fA-F]{1,8}|.)`, LiteralStringEscape, nil},
{`[^\\"]+`, LiteralStringDouble, nil},
},
},
))
}
}

View file

@ -6,14 +6,18 @@ import (
)
// Ragel lexer.
var Ragel = internal.Register(MustNewLexer(
var Ragel = internal.Register(MustNewLazyLexer(
&Config{
Name: "Ragel",
Aliases: []string{"ragel"},
Filenames: []string{},
MimeTypes: []string{},
},
Rules{
ragelRules,
))
func ragelRules() Rules {
return Rules{
"whitespace": {
{`\s+`, TextWhitespace, nil},
},
@ -72,5 +76,5 @@ var Ragel = internal.Register(MustNewLexer(
{`\{`, Punctuation, Push()},
{`\}`, Punctuation, Pop(1)},
},
},
))
}
}

View file

@ -6,14 +6,18 @@ import (
)
// Reasonml lexer.
var Reasonml = internal.Register(MustNewLexer(
var Reasonml = internal.Register(MustNewLazyLexer(
&Config{
Name: "ReasonML",
Aliases: []string{"reason", "reasonml"},
Filenames: []string{"*.re", "*.rei"},
MimeTypes: []string{"text/x-reasonml"},
},
Rules{
reasonmlRules,
))
func reasonmlRules() Rules {
return Rules{
"escape-sequence": {
{`\\[\\"\'ntbr]`, LiteralStringEscape, nil},
{`\\[0-9]{3}`, LiteralStringEscape, nil},
@ -63,5 +67,5 @@ var Reasonml = internal.Register(MustNewLexer(
{`[a-z_][\w\']*`, Name, Pop(1)},
Default(Pop(1)),
},
},
))
}
}

View file

@ -6,14 +6,18 @@ import (
)
// Reg lexer.
var Reg = internal.Register(MustNewLexer(
var Reg = internal.Register(MustNewLazyLexer(
&Config{
Name: "reg",
Aliases: []string{"registry"},
Filenames: []string{"*.reg"},
MimeTypes: []string{"text/x-windows-registry"},
},
Rules{
regRules,
))
func regRules() Rules {
return Rules{
"root": {
{`Windows Registry Editor.*`, Text, nil},
{`\s+`, Text, nil},
@ -28,5 +32,5 @@ var Reg = internal.Register(MustNewLexer(
{`.+`, LiteralString, Pop(1)},
Default(Pop(1)),
},
},
))
}
}

View file

@ -6,7 +6,7 @@ import (
)
// Rexx lexer.
var Rexx = internal.Register(MustNewLexer(
var Rexx = internal.Register(MustNewLazyLexer(
&Config{
Name: "Rexx",
Aliases: []string{"rexx", "arexx"},
@ -15,7 +15,11 @@ var Rexx = internal.Register(MustNewLexer(
NotMultiline: true,
CaseInsensitive: true,
},
Rules{
rexxRules,
))
func rexxRules() Rules {
return Rules{
"root": {
{`\s`, TextWhitespace, nil},
{`/\*`, CommentMultiline, Push("comment")},
@ -55,5 +59,5 @@ var Rexx = internal.Register(MustNewLexer(
{`\*/`, CommentMultiline, Pop(1)},
{`\*`, CommentMultiline, nil},
},
},
))
}
}

View file

@ -8,14 +8,18 @@ import (
)
// Restructuredtext lexer.
var Restructuredtext = internal.Register(MustNewLexer(
var Restructuredtext = internal.Register(MustNewLazyLexer(
&Config{
Name: "reStructuredText",
Aliases: []string{"rst", "rest", "restructuredtext"},
Filenames: []string{"*.rst", "*.rest"},
MimeTypes: []string{"text/x-rst", "text/prs.fallenstein.rst"},
},
Rules{
restructuredtextRules,
))
func restructuredtextRules() Rules {
return Rules{
"root": {
{"^(=+|-+|`+|:+|\\.+|\\'+|\"+|~+|\\^+|_+|\\*+|\\++|#+)([ \\t]*\\n)(.+)(\\n)(\\1)(\\n)", ByGroups(GenericHeading, Text, GenericHeading, Text, GenericHeading, Text), nil},
{"^(\\S.*)(\\n)(={3,}|-{3,}|`{3,}|:{3,}|\\.{3,}|\\'{3,}|\"{3,}|~{3,}|\\^{3,}|_{3,}|\\*{3,}|\\+{3,}|#{3,})(\\n)", ByGroups(GenericHeading, Text, GenericHeading, Text), nil},
@ -56,8 +60,8 @@ var Restructuredtext = internal.Register(MustNewLexer(
{"``((?=$)|(?=[-/:.,; \\n\\x00\\\u2010\\\u2011\\\u2012\\\u2013\\\u2014\\\u00a0\\'\\\"\\)\\]\\}\\>\\\u2019\\\u201d\\\u00bb\\!\\?]))", LiteralString, Pop(1)},
{"`", LiteralString, nil},
},
},
))
}
}
func rstCodeBlock(groups []string, lexer Lexer) Iterator {
iterators := []Iterator{}

View file

@ -6,7 +6,7 @@ import (
)
// Ruby lexer.
var Ruby = internal.Register(MustNewLexer(
var Ruby = internal.Register(MustNewLazyLexer(
&Config{
Name: "Ruby",
Aliases: []string{"rb", "ruby", "duby"},
@ -14,7 +14,11 @@ var Ruby = internal.Register(MustNewLexer(
MimeTypes: []string{"text/x-ruby", "application/x-ruby"},
DotAll: true,
},
Rules{
rubyRules,
))
func rubyRules() Rules {
return Rules{
"root": {
{`\A#!.+?$`, CommentHashbang, nil},
{`#.*?$`, CommentSingle, nil},
@ -39,7 +43,7 @@ var Ruby = internal.Register(MustNewLexer(
{`(0_?[0-7]+(?:_[0-7]+)*)(\s*)([/?])?`, ByGroups(LiteralNumberOct, Text, Operator), nil},
{`(0x[0-9A-Fa-f]+(?:_[0-9A-Fa-f]+)*)(\s*)([/?])?`, ByGroups(LiteralNumberHex, Text, Operator), nil},
{`(0b[01]+(?:_[01]+)*)(\s*)([/?])?`, ByGroups(LiteralNumberBin, Text, Operator), nil},
{`([\d]+(?:_\d+)*)(\s*)([/?])?`, ByGroups(LiteralNumberInteger, Text, Operator), nil},
{`([\d]+(?:[_e]\d+)*)(\s*)([/?])?`, ByGroups(LiteralNumberInteger, Text, Operator), nil},
{`@@[a-zA-Z_]\w*`, NameVariableClass, nil},
{`@[a-zA-Z_]\w*`, NameVariableInstance, nil},
{`\$\w+`, NameVariableGlobal, nil},
@ -246,5 +250,5 @@ var Ruby = internal.Register(MustNewLexer(
{`[\\#<>]`, LiteralStringRegex, nil},
{`[^\\#<>]+`, LiteralStringRegex, nil},
},
},
))
}
}

View file

@ -6,7 +6,7 @@ import (
)
// Rust lexer.
var Rust = internal.Register(MustNewLexer(
var Rust = internal.Register(MustNewLazyLexer(
&Config{
Name: "Rust",
Aliases: []string{"rust"},
@ -14,7 +14,11 @@ var Rust = internal.Register(MustNewLexer(
MimeTypes: []string{"text/rust"},
EnsureNL: true,
},
Rules{
rustRules,
))
func rustRules() Rules {
return Rules{
"root": {
{`#![^[\r\n].*$`, CommentPreproc, nil},
Default(Push("base")),
@ -131,5 +135,5 @@ var Rust = internal.Register(MustNewLexer(
{`\);?`, CommentPreproc, Pop(1)},
{`[^")]+`, CommentPreproc, nil},
},
},
))
}
}