mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 16:02:26 -05:00 
			
		
		
		
	[chore]: Bump github.com/yuin/goldmark from 1.7.2 to 1.7.3 (#3034)
This commit is contained in:
		
					parent
					
						
							
								14fda0dbbf
							
						
					
				
			
			
				commit
				
					
						ddef307622
					
				
			
		
					 4 changed files with 22 additions and 22 deletions
				
			
		
							
								
								
									
										2
									
								
								go.mod
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								go.mod
									
										
									
									
									
								
							|  | @ -63,7 +63,7 @@ require ( | |||
| 	github.com/uptrace/bun/dialect/sqlitedialect v1.2.1 | ||||
| 	github.com/uptrace/bun/extra/bunotel v1.2.1 | ||||
| 	github.com/wagslane/go-password-validator v0.3.0 | ||||
| 	github.com/yuin/goldmark v1.7.2 | ||||
| 	github.com/yuin/goldmark v1.7.3 | ||||
| 	go.opentelemetry.io/otel v1.26.0 | ||||
| 	go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 | ||||
| 	go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 | ||||
|  |  | |||
							
								
								
									
										4
									
								
								go.sum
									
										
									
									
									
								
							
							
						
						
									
										4
									
								
								go.sum
									
										
									
									
									
								
							|  | @ -631,8 +631,8 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de | |||
| github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= | ||||
| github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= | ||||
| github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= | ||||
| github.com/yuin/goldmark v1.7.2 h1:NjGd7lO7zrUn/A7eKwn5PEOt4ONYGqpxSEeZuduvgxc= | ||||
| github.com/yuin/goldmark v1.7.2/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E= | ||||
| github.com/yuin/goldmark v1.7.3 h1:fdk0a/y60GsS4NbEd13GSIP+d8OjtTkmluY32Dy1Z/A= | ||||
| github.com/yuin/goldmark v1.7.3/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E= | ||||
| gitlab.com/NyaaaWhatsUpDoc/sqlite v1.29.9-concurrency-workaround h1:gFAlklid3jyXIuZBy5Vy0dhG+F6YBgosRy4syT5CDsg= | ||||
| gitlab.com/NyaaaWhatsUpDoc/sqlite v1.29.9-concurrency-workaround/go.mod h1:ItX2a1OVGgNsFh6Dv60JQvGfJfTPHPVpV6DF59akYOA= | ||||
| go.mongodb.org/mongo-driver v1.14.0 h1:P98w8egYRjYe3XDjxhYJagTokP/H6HzlsnojRgZRd80= | ||||
|  |  | |||
							
								
								
									
										36
									
								
								vendor/github.com/yuin/goldmark/renderer/html/html.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										36
									
								
								vendor/github.com/yuin/goldmark/renderer/html/html.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -680,7 +680,7 @@ func (r *Renderer) renderImage(w util.BufWriter, source []byte, node ast.Node, e | |||
| 		_, _ = w.Write(util.EscapeHTML(util.URLEscape(n.Destination, true))) | ||||
| 	} | ||||
| 	_, _ = w.WriteString(`" alt="`) | ||||
| 	_, _ = w.Write(nodeToHTMLText(n, source)) | ||||
| 	r.renderAttribute(w, source, n) | ||||
| 	_ = w.WriteByte('"') | ||||
| 	if n.Title != nil { | ||||
| 		_, _ = w.WriteString(` title="`) | ||||
|  | @ -770,6 +770,23 @@ func (r *Renderer) renderString(w util.BufWriter, source []byte, node ast.Node, | |||
| 	return ast.WalkContinue, nil | ||||
| } | ||||
| 
 | ||||
| func (r *Renderer) renderAttribute(w util.BufWriter, source []byte, n ast.Node) { | ||||
| 	for c := n.FirstChild(); c != nil; c = c.NextSibling() { | ||||
| 		if s, ok := c.(*ast.String); ok { | ||||
| 			_, _ = r.renderString(w, source, s, true) | ||||
| 		} else if t, ok := c.(*ast.String); ok { | ||||
| 			_, _ = r.renderText(w, source, t, true) | ||||
| 		} else if !c.HasChildren() { | ||||
| 			r.Writer.Write(w, c.Text(source)) | ||||
| 			if t, ok := c.(*ast.Text); ok && t.SoftLineBreak() { | ||||
| 				w.WriteByte('\n') | ||||
| 			} | ||||
| 		} else { | ||||
| 			r.renderAttribute(w, source, c) | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| var dataPrefix = []byte("data-") | ||||
| 
 | ||||
| // RenderAttributes renders given node's attributes. | ||||
|  | @ -1007,20 +1024,3 @@ func IsDangerousURL(url []byte) bool { | |||
| 	return hasPrefix(url, bJs) || hasPrefix(url, bVb) || | ||||
| 		hasPrefix(url, bFile) || hasPrefix(url, bData) | ||||
| } | ||||
| 
 | ||||
| func nodeToHTMLText(n ast.Node, source []byte) []byte { | ||||
| 	var buf bytes.Buffer | ||||
| 	for c := n.FirstChild(); c != nil; c = c.NextSibling() { | ||||
| 		if s, ok := c.(*ast.String); ok && s.IsCode() { | ||||
| 			buf.Write(s.Text(source)) | ||||
| 		} else if !c.HasChildren() { | ||||
| 			buf.Write(util.EscapeHTML(c.Text(source))) | ||||
| 			if t, ok := c.(*ast.Text); ok && t.SoftLineBreak() { | ||||
| 				buf.WriteByte('\n') | ||||
| 			} | ||||
| 		} else { | ||||
| 			buf.Write(nodeToHTMLText(c, source)) | ||||
| 		} | ||||
| 	} | ||||
| 	return buf.Bytes() | ||||
| } | ||||
|  |  | |||
							
								
								
									
										2
									
								
								vendor/modules.txt
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								vendor/modules.txt
									
										
									
									
										vendored
									
									
								
							|  | @ -938,7 +938,7 @@ github.com/vmihailenco/tagparser/v2/internal/parser | |||
| # github.com/wagslane/go-password-validator v0.3.0 | ||||
| ## explicit; go 1.16 | ||||
| github.com/wagslane/go-password-validator | ||||
| # github.com/yuin/goldmark v1.7.2 | ||||
| # github.com/yuin/goldmark v1.7.3 | ||||
| ## explicit; go 1.19 | ||||
| github.com/yuin/goldmark | ||||
| github.com/yuin/goldmark/ast | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue