mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-29 10:57:44 +09:00 
			
		
		
		
	Vendor Update Go Libs (#13444)
* denisenkom/go-mssqldb untagged -> v0.9.0 * github.com/editorconfig/editorconfig-core-go v2.3.7 -> v2.3.8 * github.com/go-testfixtures/testfixtures v3.4.0 -> v3.4.1 * github.com/mholt/archiver v3.3.2 -> v3.5.0 * github.com/olivere/elastic v7.0.20 -> v7.0.21 * github.com/urfave/cli v1.22.4 -> v1.22.5 * github.com/xanzy/go-gitlab v0.38.1 -> v0.39.0 * github.com/yuin/goldmark-meta untagged -> v1.0.0 * github.com/ethantkoenig/rupture 0a76f03a811a -> c3b3b810dc77 * github.com/jaytaylor/html2text 8fb95d837f7d -> 3577fbdbcff7 * github.com/kballard/go-shellquote cd60e84ee657 -> 95032a82bc51 * github.com/msteinert/pam 02ccfbfaf0cc -> 913b8f8cdf8b * github.com/unknwon/paginater 7748a72e0141 -> 042474bd0eae * CI.restart() Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
		
							
								
								
									
										5
									
								
								vendor/github.com/yuin/goldmark-meta/README.md
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								vendor/github.com/yuin/goldmark-meta/README.md
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -1,5 +1,10 @@ | ||||
| goldmark-meta | ||||
| ========================= | ||||
| [![GoDev][godev-image]][godev-url] | ||||
|  | ||||
| [godev-image]: https://pkg.go.dev/badge/github.com/yuin/goldmark-meta | ||||
| [godev-url]: https://pkg.go.dev/github.com/yuin/goldmark-meta | ||||
|  | ||||
|  | ||||
| goldmark-meta is an extension for the [goldmark](http://github.com/yuin/goldmark)  | ||||
| that allows you to define document metadata in YAML format. | ||||
|   | ||||
							
								
								
									
										6
									
								
								vendor/github.com/yuin/goldmark-meta/go.mod
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								vendor/github.com/yuin/goldmark-meta/go.mod
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -1,8 +1,8 @@ | ||||
| module github.com/yuin/goldmark-meta | ||||
|  | ||||
| go 1.13 | ||||
| go 1.15 | ||||
|  | ||||
| require ( | ||||
| 	github.com/yuin/goldmark v1.1.7 | ||||
| 	gopkg.in/yaml.v2 v2.2.2 | ||||
| 	github.com/yuin/goldmark v1.2.1 | ||||
| 	gopkg.in/yaml.v2 v2.3.0 | ||||
| ) | ||||
|   | ||||
							
								
								
									
										4
									
								
								vendor/github.com/yuin/goldmark-meta/go.sum
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/github.com/yuin/goldmark-meta/go.sum
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -1,6 +1,10 @@ | ||||
| github.com/yuin/goldmark v1.1.7 h1:XiwWADvxJeIM1JbXqthrEhDc19hTMui+o+QaY1hGXlk= | ||||
| github.com/yuin/goldmark v1.1.7/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= | ||||
| github.com/yuin/goldmark v1.2.1 h1:ruQGxdhGHe7FWOJPT0mKs5+pD2Xs1Bm/kdGlHO04FmM= | ||||
| github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= | ||||
| gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= | ||||
| gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | ||||
| gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= | ||||
| gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= | ||||
| gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= | ||||
| gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= | ||||
|   | ||||
							
								
								
									
										32
									
								
								vendor/github.com/yuin/goldmark-meta/meta.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										32
									
								
								vendor/github.com/yuin/goldmark-meta/meta.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -7,6 +7,7 @@ package meta | ||||
| import ( | ||||
| 	"bytes" | ||||
| 	"fmt" | ||||
|  | ||||
| 	"github.com/yuin/goldmark" | ||||
| 	gast "github.com/yuin/goldmark/ast" | ||||
| 	east "github.com/yuin/goldmark/extension/ast" | ||||
| @@ -36,6 +37,20 @@ func Get(pc parser.Context) map[string]interface{} { | ||||
| 	return d.Map | ||||
| } | ||||
|  | ||||
| // TryGet tries to get a YAML metadata. | ||||
| // If there are YAML parsing errors, then nil and error are returned | ||||
| func TryGet(pc parser.Context) (map[string]interface{}, error) { | ||||
| 	dtmp := pc.Get(contextKey) | ||||
| 	if dtmp == nil { | ||||
| 		return nil, nil | ||||
| 	} | ||||
| 	d := dtmp.(*data) | ||||
| 	if d.Error != nil { | ||||
| 		return nil, d.Error | ||||
| 	} | ||||
| 	return d.Map, nil | ||||
| } | ||||
|  | ||||
| // GetItems returns a YAML metadata. | ||||
| // GetItems preserves defined key order. | ||||
| func GetItems(pc parser.Context) yaml.MapSlice { | ||||
| @@ -47,6 +62,21 @@ func GetItems(pc parser.Context) yaml.MapSlice { | ||||
| 	return d.Items | ||||
| } | ||||
|  | ||||
| // TryGetItems returns a YAML metadata. | ||||
| // TryGetItems preserves defined key order. | ||||
| // If there are YAML parsing errors, then nil and erro are returned. | ||||
| func TryGetItems(pc parser.Context) (yaml.MapSlice, error) { | ||||
| 	dtmp := pc.Get(contextKey) | ||||
| 	if dtmp == nil { | ||||
| 		return nil, nil | ||||
| 	} | ||||
| 	d := dtmp.(*data) | ||||
| 	if d.Error != nil { | ||||
| 		return nil, d.Error | ||||
| 	} | ||||
| 	return d.Items, nil | ||||
| } | ||||
|  | ||||
| type metaParser struct { | ||||
| } | ||||
|  | ||||
| @@ -85,7 +115,7 @@ func (b *metaParser) Open(parent gast.Node, reader text.Reader, pc parser.Contex | ||||
|  | ||||
| func (b *metaParser) Continue(node gast.Node, reader text.Reader, pc parser.Context) parser.State { | ||||
| 	line, segment := reader.PeekLine() | ||||
| 	if isSeparator(line) { | ||||
| 	if isSeparator(line) && !util.IsBlank(line) { | ||||
| 		reader.Advance(segment.Len()) | ||||
| 		return parser.Close | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user